Package 

Class CancellationToken


  • 
    public final class CancellationToken
    
                        

    Propagates notification that operations should be canceled.

    Create an instance of CancellationTokenSource and pass the token returned from CancellationTokenSource.token to the asynchronous operation(s). Call CancellationTokenSource#cancel() to cancel the operations.

    A CancellationToken can only be cancelled once - it should not be passed to future operations once cancelled.