DAG for maintaining task dependencies.
More...
|
void | Dispose () |
| Override to implement IDisposable, disposes of the read-write lock. More...
|
|
DAG for maintaining task dependencies.
◆ DAG()
◆ AddItem()
void DotMP.DAG< T, U >.AddItem |
( |
T |
id, |
|
|
U |
item, |
|
|
T[] |
dependencies |
|
) |
| |
|
inlinepackage |
Adds an item to the DAG.
- Parameters
-
id | The ID of the item to be added. |
item | The item to be added. |
dependencies | A list of ID dependencies. |
◆ CompleteItem()
Mark an item as completed, in order to remove as a dependency.
- Parameters
-
id | The ID of the item to be marked completed. |
◆ Dispose()
Override to implement IDisposable, disposes of the read-write lock.
◆ GetNextItem()
bool DotMP.DAG< T, U >.GetNextItem |
( |
out U |
item, |
|
|
out T |
id, |
|
|
out int |
tasks_remaining |
|
) |
| |
|
inlinepackage |
Gets the next item from the DAG.
- Parameters
-
item | The item returned from the DAG. |
id | The ID of the item returned from the DAG. |
tasks_remaining | The number of tasks remaining in the queue. |
- Returns
- Whether or not there was an item to be returned.
◆ TaskIsComplete()
bool DotMP.DAG< T, U >.TaskIsComplete |
( |
T |
id | ) |
|
|
inlinepackage |
Determines if a task has been completed.
- Parameters
-
id | The ID of the task to check completion. |
- Returns
- Whether or not the task has been completed.
◆ associations
ConcurrentDictionary<T, U> DotMP.DAG< T, U >.associations |
|
private |
◆ completed
ConcurrentDictionary<T, T> DotMP.DAG< T, U >.completed |
|
private |
Keeps track of what items have been completed.
◆ no_dependencies
ConcurrentBag<T> DotMP.DAG< T, U >.no_dependencies |
|
private |
Bag of items with no dependencies.
◆ rw_lock
volatile ReaderWriterLockSlim DotMP.DAG< T, U >.rw_lock |
|
private |
RW lock for managing tasks.
◆ satisfies_dependency
Dictionary<T, List<T> > DotMP.DAG< T, U >.satisfies_dependency |
|
private |
Keeps track of what task satisfies what dependencies.
◆ tasks_remaining
volatile int DotMP.DAG< T, U >.tasks_remaining |
|
private |
Counter for remaining tasks in queue.
◆ unmet_dependencies
Counts the number of yet-unmet dependencies of a task.
The documentation for this class was generated from the following file: