Package 

Class CancellationToken


  • 
    public class CancellationToken
    
                        

    Copyright 2017 Meniga Iceland Inc.

    Propagates notification that operations should be canceled.

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

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