Space Engineers
Public Member Functions | Properties | List of all members
ParallelTasks.WorkStealingScheduler Class Reference

A "work stealing" work scheduler class. More...

Inheritance diagram for ParallelTasks.WorkStealingScheduler:
ParallelTasks.IWorkScheduler

Public Member Functions

 WorkStealingScheduler ()
 Creates a new instance of the WorkStealingScheduler class. More...
 
 WorkStealingScheduler (int numThreads, ThreadPriority priority)
 Creates a new instance of the WorkStealingScheduler class. More...
 
void Schedule (Task task)
 Schedules a task for execution. More...
 
bool WaitForTasksToFinish (TimeSpan waitTimeout)
 Wait for all tasks to finish the work. More...
 

Properties

int ThreadCount [get]
 
- Properties inherited from ParallelTasks.IWorkScheduler
int ThreadCount [get]
 Gets a number of threads. This number must be correct, because it's used to run per-thread initialization task on all threads (by using barrier) More...
 

Detailed Description

A "work stealing" work scheduler class.

Definition at line 14 of file WorkStealingScheduler.cs.

Constructor & Destructor Documentation

ParallelTasks.WorkStealingScheduler.WorkStealingScheduler ( )
inline

Creates a new instance of the WorkStealingScheduler class.

Definition at line 29 of file WorkStealingScheduler.cs.

ParallelTasks.WorkStealingScheduler.WorkStealingScheduler ( int  numThreads,
ThreadPriority  priority 
)
inline

Creates a new instance of the WorkStealingScheduler class.

Parameters
numThreadsThe number of threads to create.

Definition at line 48 of file WorkStealingScheduler.cs.

Member Function Documentation

void ParallelTasks.WorkStealingScheduler.Schedule ( Task  task)
inline

Schedules a task for execution.

Parameters
taskThe task to schedule.

Implements ParallelTasks.IWorkScheduler.

Definition at line 87 of file WorkStealingScheduler.cs.

bool ParallelTasks.WorkStealingScheduler.WaitForTasksToFinish ( TimeSpan  waitTimeout)
inline

Wait for all tasks to finish the work.

Implements ParallelTasks.IWorkScheduler.

Definition at line 114 of file WorkStealingScheduler.cs.

Property Documentation

int ParallelTasks.WorkStealingScheduler.ThreadCount
get

Definition at line 22 of file WorkStealingScheduler.cs.


The documentation for this class was generated from the following file: