Handle to a cancellation scope created through ZWorkflow.newCancellationScope or ZWorkflow.newDetachedCancellationScope. Supports explicit cancelling of the code a cancellation scope wraps. The code in the CancellationScope has to be executed using run method.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Cancels the scope as well as all its children
Cancels the scope as well as all its children
Attributes
Cancels the scope as well as all its children.
Cancels the scope as well as all its children.
Value parameters
- reason
-
human readable reason for the cancellation. Becomes message of the CanceledException thrown.
Attributes
Returns cancellation reason if was specified
Returns cancellation reason if was specified
Attributes
- Returns
-
optional cancellation reason
Use this promise to perform cancellation of async operations.
Use this promise to perform cancellation of async operations.
Attributes
- Returns
-
promise that becomes ready when scope is canceled. It contains reason value or null if none was provided.
When set to false parent thread cancellation causes this one to get canceled automatically. When set to true only call to cancel leads to this scope cancellation.
When set to false parent thread cancellation causes this one to get canceled automatically. When set to true only call to cancel leads to this scope cancellation.
Attributes
Executes the code specified in this cancellation scope
Executes the code specified in this cancellation scope