mirror of
https://github.com/enso-org/enso.git
synced 2024-11-29 12:02:28 +03:00
35e5ed53d2
* Don't cancel aborted jobs immediately Rather than cancelling Futures that capture jobs' logic, this change introduces a two-level system: - interrupt all jobs softly via ThreadInterrupted at safepoints - if safepoint is not executed within some time period or it is but the job is still not cancelled, trigger a hard-interrupt by cancelling the job explicitly, if possible Closes #11084. * Only cancel Future when you mean it Soft-cancelling a future only to later call it with `mayInterrupt` set to `true` has no effect in the latter case. Changed the logic so that interrupting a Future will really enforce it. Ocassionally some commands should not attempt to run soft cancellations - we know they will re-execute the program. * Replace Thread.sleep with Future.get No while loops etc, it's much easier to reason about what is soft and hard interrupt supposed to do. * Better comments/logs * nit * PR review * Make test more robust |
||
---|---|---|
.. | ||
bench/java/org/enso/interpreter/instrument | ||
main | ||
test |