CompletableFuture.Cancel(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If not already completed, completes this CompletableFuture with
a CancellationException
.
[Android.Runtime.Register("cancel", "(Z)Z", "GetCancel_ZHandler", ApiSince=24)]
public virtual bool Cancel (bool mayInterruptIfRunning);
[<Android.Runtime.Register("cancel", "(Z)Z", "GetCancel_ZHandler", ApiSince=24)>]
abstract member Cancel : bool -> bool
override this.Cancel : bool -> bool
Parameters
- mayInterruptIfRunning
- Boolean
this value has no effect in this implementation because interrupts are not used to control processing.
Returns
true
if this task is now cancelled
Implements
- Attributes
Remarks
If not already completed, completes this CompletableFuture with a CancellationException
. Dependent CompletableFutures that have not already completed will also complete exceptionally, with a CompletionException
caused by this CancellationException
.
Java documentation for java.util.concurrent.CompletableFuture.cancel(boolean)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.