Condividi tramite


ForkJoinTask.Complete(Object) Method

Definition

Completes this task, and if not already aborted or cancelled, returning the given value as the result of subsequent invocations of join and related operations.

[Android.Runtime.Register("complete", "(Ljava/lang/Object;)V", "GetComplete_Ljava_lang_Object_Handler")]
public virtual void Complete (Java.Lang.Object? value);
[<Android.Runtime.Register("complete", "(Ljava/lang/Object;)V", "GetComplete_Ljava_lang_Object_Handler")>]
abstract member Complete : Java.Lang.Object -> unit
override this.Complete : Java.Lang.Object -> unit

Parameters

value
Object

the result value for this task

Attributes

Remarks

Completes this task, and if not already aborted or cancelled, returning the given value as the result of subsequent invocations of join and related operations. This method may be used to provide results for asynchronous tasks, or to provide alternative handling for tasks that would not otherwise complete normally. Its use in other situations is discouraged. This method is overridable, but overridden versions must invoke super implementation to maintain guarantees.

Java documentation for java.util.concurrent.ForkJoinTask.complete(V).

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.

Applies to