C# Class Brod.Common.Tasks.TaskEngine

TaskEngine that starts, waits or cancells execution of Tasks
Inheritance: IDisposable
ファイルを表示 Open project: paralect/brod Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Try to dispose all tasks

Start ( CancellationToken token, Int32 timeout ) : Task

Start engine host. This will start each task in registered in this host.

TaskEngine ( ) : System

Constructor overload

TaskEngine ( ICollection tasks ) : System

Constructs TaskEngine with specified non-empty collection of tasks

Private Methods

Method Description
Initialize ( ) : void

Initialize Engine TaskEngine

Method Details

Dispose() public method

Try to dispose all tasks
public Dispose ( ) : void
return void

Start() public method

Start engine host. This will start each task in registered in this host.
public Start ( CancellationToken token, Int32 timeout ) : Task
token System.Threading.CancellationToken /// A CancellationToken to observe while waiting for the tasks to complete. ///
timeout System.Int32 /// The number of milliseconds to wait, or Infinite (-1) to wait indefinitely ///
return Task

TaskEngine() public method

Constructor overload
public TaskEngine ( ) : System
return System

TaskEngine() public method

Constructs TaskEngine with specified non-empty collection of tasks
public TaskEngine ( ICollection tasks ) : System
tasks ICollection
return System