Sdílet prostřednictvím


FutureTask.RunAndReset Method

Definition

Executes the computation without setting its result, and then resets this future to initial state, failing to do so if the computation encounters an exception or is cancelled.

[Android.Runtime.Register("runAndReset", "()Z", "GetRunAndResetHandler")]
protected virtual bool RunAndReset ();
[<Android.Runtime.Register("runAndReset", "()Z", "GetRunAndResetHandler")>]
abstract member RunAndReset : unit -> bool
override this.RunAndReset : unit -> bool

Returns

true if successfully run and reset

Attributes

Remarks

Executes the computation without setting its result, and then resets this future to initial state, failing to do so if the computation encounters an exception or is cancelled. This is designed for use with tasks that intrinsically execute more than once.

Java documentation for java.util.concurrent.FutureTask.runAndReset().

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