Click or drag to resize

ThreadPool Methods

The ThreadPool type exposes the following members.

Methods
  NameDescription
Public methodStatic memberFetchWorkerAndExecuteWork
Tries to fetch a worker, if this fails (because the thread pool is depleted) -1 is returned. Otherwise, a worker starts executing the given task, and its internal thread id is returned.
Public methodStatic memberSetPoolSize
Tries to set the pool size to numThreads for doing work. Returns the number of threads really set, which may be lower due to a lower number of processors available. Only to be called once.
Public methodStatic memberWaitForWorkDone
Waits until the thread of the given internal thread id completed executing its task
Top
See Also