Compartilhar via


ForkJoinTask.PollTask Method

Definition

If the current thread is operating in a ForkJoinPool, unschedules and returns, without executing, the next task queued by the current thread but not yet executed, if one is available, or if not available, a task that was forked by some other thread, if available.

[Android.Runtime.Register("pollTask", "()Ljava/util/concurrent/ForkJoinTask;", "")]
protected static Java.Util.Concurrent.ForkJoinTask? PollTask ();
[<Android.Runtime.Register("pollTask", "()Ljava/util/concurrent/ForkJoinTask;", "")>]
static member PollTask : unit -> Java.Util.Concurrent.ForkJoinTask

Returns

a task, or null if none are available

Attributes

Remarks

If the current thread is operating in a ForkJoinPool, unschedules and returns, without executing, the next task queued by the current thread but not yet executed, if one is available, or if not available, a task that was forked by some other thread, if available. Availability may be transient, so a null result does not necessarily imply quiescence of the pool this task is operating in. This method is designed primarily to support extensions, and is unlikely to be useful otherwise.

Java documentation for java.util.concurrent.ForkJoinTask.pollTask().

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