ForkJoinPool.IForkJoinWorkerThreadFactory.NewThread(ForkJoinPool) Method

Definition

Returns a new worker thread operating in the given pool.

[Android.Runtime.Register("newThread", "(Ljava/util/concurrent/ForkJoinPool;)Ljava/util/concurrent/ForkJoinWorkerThread;", "GetNewThread_Ljava_util_concurrent_ForkJoinPool_Handler:Java.Util.Concurrent.ForkJoinPool/IForkJoinWorkerThreadFactoryInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.Concurrent.ForkJoinWorkerThread? NewThread (Java.Util.Concurrent.ForkJoinPool? pool);
[<Android.Runtime.Register("newThread", "(Ljava/util/concurrent/ForkJoinPool;)Ljava/util/concurrent/ForkJoinWorkerThread;", "GetNewThread_Ljava_util_concurrent_ForkJoinPool_Handler:Java.Util.Concurrent.ForkJoinPool/IForkJoinWorkerThreadFactoryInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member NewThread : Java.Util.Concurrent.ForkJoinPool -> Java.Util.Concurrent.ForkJoinWorkerThread

Parameters

pool
ForkJoinPool

the pool this thread works in

Returns

the new worker thread, or null if the request to create a thread is rejected

Attributes

Remarks

Returns a new worker thread operating in the given pool. Returning null or throwing an exception may result in tasks never being executed. If this method throws an exception, it is relayed to the caller of the method (for example execute) causing attempted thread creation. If this method returns null or throws an exception, it is not retried until the next attempted creation (for example another call to execute).

Java documentation for java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory.newThread(java.util.concurrent.ForkJoinPool).

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