Thread |
public static class ThreadPool
The ThreadPool type exposes the following members.
| Name | Description | |
|---|---|---|
| PoolSize | ||
| PoolSizeWasSet | ||
| ThreadId | The internal thread id, not the ManagedThreadId of the thread. |
| Name | Description | |
|---|---|---|
| FetchWorkerAndExecuteWork | 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. | |
| SetPoolSize | 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. | |
| WaitForWorkDone | Waits until the thread of the given internal thread id completed executing its task |