Cancels tasks on this executor.
This does not permanently disable the executor. Use shutdown() for that.
Optionalreason: unknownOptional reason for cancellation
Cancels tasks on this executor.
This does not permanently disable the executor. Use shutdown() for that.
Cancels tasks on this executor.
This does not permanently disable the executor. Use shutdown() for that.
Optional reason for cancellation
Cancels tasks on this executor.
This does not permanently disable the executor. Use shutdown() for that.
OptionalreasonOrOptions: unknownOptionalmaybeOptions: TaskCancelOptionsProtectedcancelOptionalreason: unknownProtectedcancelHandles selective cancellation requests (e.g., by task kind). Default behaviour upgrades to a full cancellation.
ProtectedcheckProtectedgetReturns true if this executor has been permanently shut down. Kept for backward compatibility.
ProtectedisProtectedonHook for subclasses to cancel current and queued tasks.
Called whenever cancel() without filters is invoked.
Optionalreason: unknownProtectedonHook for subclasses to perform permanent shutdown cleanup. Default behavior first cancels all tasks. Subclasses can extend this to stop internal workers/timers.
Optionalreason: unknownThe shutdown reason
Optionalreason: unknown
A task executor that limits the rate of task execution. Enforces a maximum number of requests per time window using a sliding window algorithm.
Example