PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.IParallelWorker< T > Interface Template Reference

Describes a parallel worker for functions returning values. More...

Inheritance diagram for PeanutButter.Utils.IParallelWorker< T >:
PeanutButter.Utils.ParallelWorker< T >

Public Member Functions

void AddWorker (Func< T > worker)
 Add a single worker.
void AddWorkers (IEnumerable< Func< T > > workers)
 Add a bunch of workers.
WorkResult< T >[] RunAll ()
 Run all the queued work with the default max degree of parallelism.
WorkResult< T >[] RunAll (int maxDegreeOfParallelism)
 Run all the queued work with the provided max degree of parallelism.

Properties

bool Busy [get]
 Will be true whilst the worker is busy.

Detailed Description

Describes a parallel worker for functions returning values.

Template Parameters
T

Member Function Documentation

◆ AddWorker()

void PeanutButter.Utils.IParallelWorker< T >.AddWorker ( Func< T > worker)

Add a single worker.

Parameters
worker

Implemented in PeanutButter.Utils.ParallelWorker< T >.

◆ AddWorkers()

void PeanutButter.Utils.IParallelWorker< T >.AddWorkers ( IEnumerable< Func< T > > workers)

Add a bunch of workers.

Parameters
workers

Implemented in PeanutButter.Utils.ParallelWorker< T >.

◆ RunAll() [1/2]

Run all the queued work with the default max degree of parallelism.

Returns

Implemented in PeanutButter.Utils.ParallelWorker< T >.

◆ RunAll() [2/2]

WorkResult< T >[] PeanutButter.Utils.IParallelWorker< T >.RunAll ( int maxDegreeOfParallelism)

Run all the queued work with the provided max degree of parallelism.

Parameters
maxDegreeOfParallelism
Returns
Exceptions
InvalidOperationException

Implemented in PeanutButter.Utils.ParallelWorker< T >.

Property Documentation

◆ Busy

Will be true whilst the worker is busy.

Implemented in PeanutButter.Utils.ParallelWorker< T >.


The documentation for this interface was generated from the following file:
  • source/Utils/PeanutButter.Utils/ParallelWorker.cs