Cancellation Token Source
A CancellationTokenSource
allows you to issue cancellation requests to one or more org.gradle.tooling.LongRunningOperation instances. To use a token source:
- Create a token source using newCancellationTokenSource.
- Attach the token to one or more operations using withCancellationToken. You need to do this before you start the operation.
- Later, you can cancel the associated operations by calling cancel on this token source.
All implementations of this interface are required to be thread safe.
Since
2.1