Interface TaskCancellationToken
public interface TaskCancellationToken
Cancellation token visible to task handlers.
Implementations must be thread-safe. Cancellation is best-effort: a task handler must poll the token or use scheduler-specific interruption hooks to observe cancellation promptly.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether cancellation has been requested.taskId()Returns the task id.
-
Method Details
-
taskId
-
cancellationRequested
boolean cancellationRequested()Returns whether cancellation has been requested.- Returns:
- cancellation flag
-