PeanutButter
|
Describes a parallel worker for actions. More...
Public Member Functions | |
void | AddWorkers (IEnumerable< Action > workers) |
Add some workers to the queue. If the work is already running, they will be added to the end and executed when the queue is complete. | |
void | AddWorker (Action worker) |
Add a single worker to the queue. If the work is already running, it will be added to the end and executed when the queue is complete. | |
Exception[] | RunAll () |
Run all the queued work with the default max degree of parallelism. | |
Exception[] | RunAll (int maxDegreeOfParallelism) |
Run all the queued work with the provided max degree of parallelism. |
Additional Inherited Members | |
Properties inherited from PeanutButter.Utils.IWorker | |
bool | Busy [get] |
Will be true whilst the worker is busy. | |
int | DefaultMaxDegreeOfParallelism [get, set] |
Indicates the default MaxDegreeOfParallelism for ParallelWorker (should default to the number of available cores, on the assumption that workloads are more often cpu-bound than I/O-bound). |
Describes a parallel worker for actions.
void PeanutButter.Utils.IParallelWorker.AddWorker | ( | Action | worker | ) |
Add a single worker to the queue. If the work is already running, it will be added to the end and executed when the queue is complete.
worker |
Implemented in PeanutButter.Utils.ParallelWorker.
void PeanutButter.Utils.IParallelWorker.AddWorkers | ( | IEnumerable< Action > | workers | ) |
Add some workers to the queue. If the work is already running, they will be added to the end and executed when the queue is complete.
workers |
Implemented in PeanutButter.Utils.ParallelWorker.
Exception[] PeanutButter.Utils.IParallelWorker.RunAll | ( | ) |
Run all the queued work with the default max degree of parallelism.
Implemented in PeanutButter.Utils.ParallelWorker.
Exception[] PeanutButter.Utils.IParallelWorker.RunAll | ( | int | maxDegreeOfParallelism | ) |
Run all the queued work with the provided max degree of parallelism.
Implemented in PeanutButter.Utils.ParallelWorker.