Class Workload<R>
A piece of work that can be executed.
Inherited Members
Namespace: SpiceSharp.Components.ParallelComponents
Assembly: SpiceSharp.dll
Syntax
public class Workload<R>
Type Parameters
Name | Description |
---|---|
R | The return value. |
Constructors
Workload(IWorkDistributor<R>, int)
Initializes a new instance of the Workload<R> class.
Declaration
public Workload(IWorkDistributor<R> distributor, int capacity)
Parameters
Type | Name | Description |
---|---|---|
IWorkDistributor<R> | distributor | The distributor. |
int | capacity | The initial capacity. |
Properties
Functions
Gets the functions.
Declaration
public List<Func<R>> Functions { get; }
Property Value
Type | Description |
---|---|
List<Func<R>> | The functions. |
Methods
Execute()
Executes the work.
Declaration
public R Execute()
Returns
Type | Description |
---|---|
R | The combined result. |