ForkJoinTask.Fork Method

Definition

Arranges to asynchronously execute this task in the pool the current task is running in, if applicable, or using the ForkJoinPool#commonPool() if not #inForkJoinPool.

[Android.Runtime.Register("fork", "()Ljava/util/concurrent/ForkJoinTask;", "")]
public Java.Util.Concurrent.ForkJoinTask? Fork ();
[<Android.Runtime.Register("fork", "()Ljava/util/concurrent/ForkJoinTask;", "")>]
member this.Fork : unit -> Java.Util.Concurrent.ForkJoinTask

Returns

this, to simplify usage

Attributes

Remarks

Arranges to asynchronously execute this task in the pool the current task is running in, if applicable, or using the ForkJoinPool#commonPool() if not #inForkJoinPool. While it is not necessarily enforced, it is a usage error to fork a task more than once unless it has completed and been reinitialized. Subsequent modifications to the state of this task or any data it operates on are not necessarily consistently observable by any thread other than the one executing it unless preceded by a call to #join or related methods, or a call to #isDone returning true.

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

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