Replies: 1 comment
-
In gears we are currently settling with not requiring Scheduler tasks to be fully interruptible. This cannot be done e.g. in Scala Native without tracking the underlying running thread and try to send an interrupt signal to it. I think for now, while we're looking at preemption patterns, that this is not something I'd be eager to expose. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking at the behaviour exemplified by this test:
What's the reason for this contract? Cancelling a scheduled task, while running, is a fair use-case. Java exposes a mayInterruptIfRunning boolean flag, for such cases, however, in its absence, the better default would be to interrupt if running. Because you can make any scheduled code to be non-interruptible.
Beta Was this translation helpful? Give feedback.
All reactions