The Playground Queue class is a self-managed thread pool which consumes actions sent into EnqueueTask(Action).
More...
|
| PlaygroundQueue (int workerCount, Action< T > dequeueAction) |
| Initializes a new instance of the PlaygroundQueue{T} class. More...
|
|
bool | HasPool () |
|
bool | HasTasks () |
|
int | ThreadPoolCount () |
|
int | TaskCount () |
|
void | SetThreadPool (int amount) |
| Resizes the thread pool. More...
|
|
void | EnqueueTask (T task) |
| Enqueues an asynchronous task to run on a separate thread. More...
|
|
void | Dispose () |
| Disposes all worker threads. More...
|
|
The Playground Queue class is a self-managed thread pool which consumes actions sent into EnqueueTask(Action).
ParticlePlayground.PlaygroundQueue< T >.PlaygroundQueue |
( |
int |
workerCount, |
|
|
Action< T > |
dequeueAction |
|
) |
| |
Initializes a new instance of the PlaygroundQueue{T} class.
- Parameters
-
workerCount | The amount of worker threads. |
dequeueAction | The dequeue action. |
void ParticlePlayground.PlaygroundQueue< T >.Dispose |
( |
| ) |
|
Disposes all worker threads.
void ParticlePlayground.PlaygroundQueue< T >.EnqueueTask |
( |
T |
task | ) |
|
Enqueues an asynchronous task to run on a separate thread.
- Parameters
-
task | The task to be run on a separate thread. |
void ParticlePlayground.PlaygroundQueue< T >.SetThreadPool |
( |
int |
amount | ) |
|
Resizes the thread pool.
- Parameters
-
amount | The amount of available threads in the pool. |
The documentation for this class was generated from the following file: