Interface CancelRegistration
- All Superinterfaces:
AutoCloseable
An action a language registered with
EvaluationContext.onCancel(Runnable), to be run when its run passes its
deadline. Closing it before then means the action never runs.
Returned by the engine. A language's own unit tests may implement it, as a fake; a method added to this
interface is a default method, so such an implementation keeps compiling.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Stops the action from running, if it hasn't started yet.
-
Method Details
-
close
void close()Stops the action from running, if it hasn't started yet. Closing it while the action runs, or after it has run, does nothing, and doesn't wait for the action to finish. It can be called any number of times, on any thread, and throws nothing.- Specified by:
closein interfaceAutoCloseable
-