- Loading...
...
A fiber executing in cancellable scope may be cancelled by invoking its cancel method to set the fiber’s cancel status and unpark the fiber. Cancellation works cooperatively: a Fiber needs to check for cancellation (say, when doing blocking operations), and throw an appropriate exception for the context that it is running in . (which might be an InterruptedException in methods that throw this exception, an IOException or sub-class when in a method that does I/O).
At this time, the following blocking operations wakeup and throw an exception when the fiber is cancelled:
...