Worker |
public static class WorkerPool
The WorkerPool type exposes the following members.
| Name | Description | |
|---|---|---|
| PoolSize | ||
| Task | ||
| ThreadId | The internal thread id, not the ManagedThreadId of the thread. |
| Name | Description | |
|---|---|---|
| EnsurePoolSize | Tries to ensure the pool contains numThreads for doing work. Returns the number of threads ensured, which may be lower due to a lower number of processors available (but won't be higher, even if another caller requested and was granted more threads). Only to be called while no work is underway. | |
| StartWork | Executes the work inside task with numThreads | |
| WaitForWorkDone | Waits until the tasks were executed |