Safely cancelling jobs
Hi,
Is there a way to safely cancelling jobs without needing to know if they have started, running or finished? I do multiple simulations in parallel, and many of them are finished around the same time. Some of the results become redundant after processing the others, but calling e.g. async_res.abort() on the redundant ones quite often freezes the execution (probably the assertion of the job not being finished passes but in the meanwhile the result arrives). So currently I can't abort them because of the chance of freezing the execution.
I'm not sure how easy this is right now, but we should probably add an 'abort_if_possible` that aborts only if it isn't done, since this kind of use case is common.