Share via


Executors.NewWorkStealingPool Method

Definition

Overloads

NewWorkStealingPool()

Creates a work-stealing thread pool using the number of Runtime#availableProcessors available processors as its target parallelism level.

NewWorkStealingPool(Int32)

Creates a thread pool that maintains enough threads to support the given parallelism level, and may use multiple queues to reduce contention.

NewWorkStealingPool()

Creates a work-stealing thread pool using the number of Runtime#availableProcessors available processors as its target parallelism level.

[Android.Runtime.Register("newWorkStealingPool", "()Ljava/util/concurrent/ExecutorService;", "", ApiSince=24)]
public static Java.Util.Concurrent.IExecutorService? NewWorkStealingPool ();
[<Android.Runtime.Register("newWorkStealingPool", "()Ljava/util/concurrent/ExecutorService;", "", ApiSince=24)>]
static member NewWorkStealingPool : unit -> Java.Util.Concurrent.IExecutorService

Returns

the newly created thread pool

Attributes

Remarks

Creates a work-stealing thread pool using the number of Runtime#availableProcessors available processors as its target parallelism level.

Added in 1.8.

Java documentation for java.util.concurrent.Executors.newWorkStealingPool().

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

NewWorkStealingPool(Int32)

Creates a thread pool that maintains enough threads to support the given parallelism level, and may use multiple queues to reduce contention.

[Android.Runtime.Register("newWorkStealingPool", "(I)Ljava/util/concurrent/ExecutorService;", "", ApiSince=24)]
public static Java.Util.Concurrent.IExecutorService? NewWorkStealingPool (int parallelism);
[<Android.Runtime.Register("newWorkStealingPool", "(I)Ljava/util/concurrent/ExecutorService;", "", ApiSince=24)>]
static member NewWorkStealingPool : int -> Java.Util.Concurrent.IExecutorService

Parameters

parallelism
Int32

the targeted parallelism level

Returns

the newly created thread pool

Attributes

Remarks

Creates a thread pool that maintains enough threads to support the given parallelism level, and may use multiple queues to reduce contention. The parallelism level corresponds to the maximum number of threads actively engaged in, or available to engage in, task processing. The actual number of threads may grow and shrink dynamically. A work-stealing pool makes no guarantees about the order in which submitted tasks are executed.

Added in 1.8.

Java documentation for java.util.concurrent.Executors.newWorkStealingPool(int).

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