Attributes
- Companion
- class
- Graph
-
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
CancelledError.type
Members list
Type members
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Runs body, returning a thrown InterruptedException as Left(CancelledError) with the flag set, and applying whenInterrupted to what it returns. Other exceptions propagate.
Runs body, returning a thrown InterruptedException as Left(CancelledError) with the flag set, and applying whenInterrupted to what it returns. Other exceptions propagate.
Attributes
Some(CancelledError) if t is a cancellation (see isCancellation); otherwise None.
Some(CancelledError) if t is a cancellation (see isCancellation); otherwise None.
Classifies only: it never sets the interrupt flag. The flag belongs to the thread that was interrupted, and the code mapping t may be running on another one - a Future callback on a pool thread, say. Code that itself caught an InterruptedException restores the flag.
Attributes
Whether t is a cancellation: the current thread is interrupted, or t or one of its causes is an InterruptedException or a ClosedByInterruptException.
Whether t is a cancellation: the current thread is interrupted, or t or one of its causes is an InterruptedException or a ClosedByInterruptException.
The flag test matters on a virtual thread, where an interrupt during a blocking socket read closes the socket and surfaces as an ordinary SocketException. A bare java.io.InterruptedIOException (including SocketTimeoutException) is not enough on its own: OkHttp reports its call timeout as InterruptedIOException("timeout"), and a timeout stays a timeout. It counts only through the flag or an InterruptedException beneath it.
Attributes
A failure that ends while the current thread is interrupted is a cancellation.
A failure that ends while the current thread is interrupted is a cancellation.