Dagger.jl icon indicating copy to clipboard operation
Dagger.jl copied to clipboard

ctrl+c while in the scheduler should raise SIGINT on all processes

Open shashi opened this issue 5 years ago • 2 comments

We may have to wrap this whole while loop in a try catch: https://github.com/JuliaParallel/Dagger.jl/blob/master/src/scheduler.jl#L108

and watch for InterruptExceptions, which then get forwarded to the worker procs.

I'm not sure how this works out when the workers are running many threads.

shashi avatar Aug 20 '20 23:08 shashi

We should be able to wrap the call to compute in a try-catch, and also forward any exceptions that occur in async calls like async_apply and any try-catch blocks that already exist.

jpsamaroo avatar Aug 21 '20 13:08 jpsamaroo

As @kshyatt pointed out, we'll also want the ability for thunks to cancel other thunks (supported by #117 ). e.g. optimization problems could use Dagger to schedule a number of concurrent "walker" thunks, and a "waiter" thunk will be co-executed and will wait until a walker thunk terminates with a suitable value below some threshold, and then terminate the rest of the walkers (and/or stop more from being scheduled).

jpsamaroo avatar Nov 30 '20 19:11 jpsamaroo