共用方式為


CountedCompleter.Complete(Object) Method

Definition

Regardless of pending count, invokes #onCompletion(CountedCompleter), marks this task as complete and further triggers #tryComplete on this task's completer, if one exists.

[Android.Runtime.Register("complete", "(Ljava/lang/Object;)V", "GetComplete_Ljava_lang_Object_Handler", ApiSince=24)]
public override void Complete (Java.Lang.Object? rawResult);
[<Android.Runtime.Register("complete", "(Ljava/lang/Object;)V", "GetComplete_Ljava_lang_Object_Handler", ApiSince=24)>]
override this.Complete : Java.Lang.Object -> unit

Parameters

rawResult
Object

the raw result

Attributes

Remarks

Regardless of pending count, invokes #onCompletion(CountedCompleter), marks this task as complete and further triggers #tryComplete on this task's completer, if one exists. The given rawResult is used as an argument to #setRawResult before invoking #onCompletion(CountedCompleter) or marking this task as complete; its value is meaningful only for classes overriding setRawResult. This method does not modify the pending count.

This method may be useful when forcing completion as soon as any one (versus all) of several subtask results are obtained. However, in the common (and recommended) case in which setRawResult is not overridden, this effect can be obtained more simply using #quietlyCompleteRoot().

Java documentation for java.util.concurrent.CountedCompleter.complete(T).

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