CancellationTokenSource Class
- java.
lang. Object - system.
fabric. CancellationTokenSource
- system.
public class CancellationTokenSource
A CancellationTokenSource is used to create CancellationToken object and manage it.
Constructor Summary
Constructor | Description |
---|---|
CancellationTokenSource() |
Initializes a new instance of the system.fabric.CancellationTokenSource class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Requests cancel on the CancellationToken being managed by this object. |
Cancellation |
getToken()
Returns the cancellation token which is being by this system.fabric.CancellationTokenSource object. |
boolean |
isCancellationRequested()
Gets whether cancellation has been requested for this system.fabric.CancellationTokenSource. |
Constructor Details
CancellationTokenSource
public CancellationTokenSource()
Initializes a new instance of the system.fabric.CancellationTokenSource class.
Method Details
cancel
public void cancel()
Requests cancel on the CancellationToken being managed by this object.
getToken
public CancellationToken getToken()
Returns the cancellation token which is being by this system.fabric.CancellationTokenSource object.
Returns:
isCancellationRequested
public boolean isCancellationRequested()
Gets whether cancellation has been requested for this system.fabric.CancellationTokenSource.
Returns:
Applies to
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per