enso/lib
Hubert Plociniczak 35e5ed53d2
Don't cancel aborted jobs immediately (#11375)
* 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
2024-11-05 10:33:02 +01:00
..
java Make Graph.nextId() private (#11486) 2024-11-05 05:21:10 +01:00
js/runner Unify Frontend App (#11287) 2024-10-11 18:23:02 +00:00
rust Move documentation into documentable types (#11441) 2024-11-04 15:33:53 +00:00
scala Don't cancel aborted jobs immediately (#11375) 2024-11-05 10:33:02 +01:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

Libraries

This directory contains the libraries that should remain in this project, but that are not technically part of the main language implementation itself.