Java.Util.Concurrent.Executors.NewFixedThreadPool Method
Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to create new threads when needed.

Syntax

[Android.Runtime.Register("newFixedThreadPool", "(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", "")]
public static IExecutorService NewFixedThreadPool (int nThreads, IThreadFactory threadFactory)

Parameters

nThreads
the number of threads in the pool
threadFactory
the factory to use when creating new threads

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.NullPointerExceptionif threadFactory is null
Java.Lang.IllegalArgumentExceptionif nThreads <= 0

Remarks

Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to create new threads when needed. At any point, at most nThreads threads will be active processing tasks. If additional tasks are submitted when all threads are active, they will wait in the queue until a thread is available. If any thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks. The threads in the pool will exist until it is explicitly IExecutorService.Shutdown.

[Android Documentation]

Requirements

Namespace: Java.Util.Concurrent
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1