A simple container for a Queue<Action> for managing tasks. Will grow in complexity as dependencies are added and a dependency graph must be generated.
More...
|
static DAG< ulong, Action > | dag = new DAG<ulong, Action>() |
| DAG of tasks that must execute. We use a DAG in order to maintain dependency chains. More...
|
|
A simple container for a Queue<Action> for managing tasks. Will grow in complexity as dependencies are added and a dependency graph must be generated.
◆ TaskingContainer()
DotMP.TaskingContainer.TaskingContainer |
( |
| ) |
|
|
inlinepackage |
◆ CompleteTask()
void DotMP.TaskingContainer.CompleteTask |
( |
ulong |
uuid | ) |
|
|
inlinepackage |
Mark task as completed to remove as a dependency in the DAG.
- Parameters
-
uuid | UUID of task to remove as a dependency. |
◆ EnqueueTask()
TaskUUID DotMP.TaskingContainer.EnqueueTask |
( |
Action |
action, |
|
|
TaskUUID[] |
depends |
|
) |
| |
|
inlinepackage |
Enqueues a task to the queue.
- Parameters
-
action | The task to enqueue. |
depends | List of task dependencies. |
- Returns
- Task generated from the enqueue task action.
◆ EnqueueTaskloopTask()
TaskUUID DotMP.TaskingContainer.EnqueueTaskloopTask |
( |
int |
start, |
|
|
int |
end, |
|
|
Action< int > |
action, |
|
|
TaskUUID[] |
depends |
|
) |
| |
|
inlinepackage |
Enqueues a taskloop task to the task queue.
- Parameters
-
start | The start of the current taskloop task, inclusive. |
end | The end of the current taskloop task, exclusive. |
action | The action to be executed. |
depends | List of task dependencies. |
- Returns
- Task generated from this iteration of the taskloop.
◆ GetNextTask()
bool DotMP.TaskingContainer.GetNextTask |
( |
out Action |
action, |
|
|
out ulong |
uuid, |
|
|
out int |
tasks_remaining |
|
) |
| |
|
inlinepackage |
Gets the next task from the queue.
- Parameters
-
action | The body of the task to be executed. |
uuid | The UUID of the task to be executed. |
tasks_remaining | The number of tasks remaining in the queue. |
- Returns
- Whether or not the action was successful.
◆ ResetDAG()
void DotMP.TaskingContainer.ResetDAG |
( |
| ) |
|
|
inlinepackage |
Resets the DAG to a default state. Allows the garbage collector to collect unused data.
◆ ResetDAGNotThreadSafe()
void DotMP.TaskingContainer.ResetDAGNotThreadSafe |
( |
| ) |
|
|
inlinepackage |
Resets the DAG to a default state. Allows the garbage collector to collect unused data. Unlike ResetDAG(), this version is not thread-safe!
◆ TaskIsComplete()
bool DotMP.TaskingContainer.TaskIsComplete |
( |
ulong |
uuid | ) |
|
|
inlinepackage |
Determines if a task has been completed.
- Parameters
-
uuid | The ID of the task to check completion. |
- Returns
- Whether or not the task has been completed.
◆ dag
DAG<ulong, Action> DotMP.TaskingContainer.dag = new DAG<ulong, Action>() |
|
staticprivate |
DAG of tasks that must execute. We use a DAG in order to maintain dependency chains.
The documentation for this class was generated from the following file: