C# Class DotNetWorkQueue.TaskScheduling.SchedulerTaskFactory

Extends the standard task factory to allow for trying to add a new task, but failing to do so.
Inheritance: ITaskFactory
Afficher le fichier Open project: blehnen/DotNetWorkQueue

Méthodes publiques

Méthode Description
SchedulerTaskFactory ( ITaskSchedulerFactory schedulerFactory ) : System

Initializes a new instance of the SchedulerTaskFactory class.

TryStartNew ( Action action, StateInformation state, Action continueWith, System.Threading.Tasks.Task &task ) : TryStartNewResult

Tries to add a new task to the task factory

The factory may reject the request if it's too busy.

Private Methods

Méthode Description
SchedulerHasRoom ( StateInformation state ) : bool

Returns true if the scheduler has room for another task

Method Details

SchedulerTaskFactory() public méthode

Initializes a new instance of the SchedulerTaskFactory class.
public SchedulerTaskFactory ( ITaskSchedulerFactory schedulerFactory ) : System
schedulerFactory ITaskSchedulerFactory The scheduler factory.
Résultat System

TryStartNew() public méthode

Tries to add a new task to the task factory
The factory may reject the request if it's too busy.
public TryStartNew ( Action action, StateInformation state, Action continueWith, System.Threading.Tasks.Task &task ) : TryStartNewResult
action Action The action.
state StateInformation The state.
continueWith Action The continue with action.
task System.Threading.Tasks.Task The task.
Résultat TryStartNewResult