enso/lib/scala
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
..
akka-native/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
bench-processor/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
cli/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
common-polyglot-core-utils/src/main/java engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
connected-lock-manager/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
connected-lock-manager-server/src/main engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
distribution-manager/src/main engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
downloader/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
edition-updater/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
edition-uploader/src/main Prepare for JPMS - rename packages (#10974) 2024-09-06 10:27:59 +02:00
editions/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
filewatcher/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
interpreter-dsl/src/main/java engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
json-rpc-server engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
json-rpc-server-test Add project/duplicate endpoint (#10407) 2024-07-02 11:39:43 +00:00
library-manager/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
library-manager-test/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
locking-test-helper/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
logging-config/src/main/java engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
logging-service/src/main/java engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
logging-service-logback/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
logging-truffle-connector/src/main Towards simplifying runtime-compiler dependencies (#8894) 2024-04-25 10:03:42 +02:00
logging-utils/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
logging-utils-akka/src/main Don't cancel aborted jobs immediately (#11375) 2024-11-05 10:33:02 +01:00
pkg Fix Meta.get_qualified_type_name when run as single file (#11401) 2024-10-31 15:25:45 +00:00
process-utils/src/main engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
profiling-utils/src ydoc-server is a separate module (#10156) 2024-06-07 12:56:42 +02:00
project-manager Allow project manager to read files (#11204) 2024-10-01 16:52:29 +00:00
refactoring-utils/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
runtime-version-manager/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
runtime-version-manager-test/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
searcher/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
semver/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
task-progress-notifications/src/main engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
testkit/src/main Prepare for JPMS - rename packages (#10974) 2024-09-06 10:27:59 +02:00
text-buffer/src engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
version-output/src/main/java engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00
yaml/src/main engine-runner and language-server are separate JPMS modules (#10823) 2024-09-25 21:33:13 +02:00