Wraps a IEventExecutor inside a TaskScheduler and allow scheduling of Task instances onto that executor.
Inheritance: System.Threading.Tasks.TaskScheduler
Ejemplo n.º 1
0
 public SingleThreadEventExecutor(string threadName, TimeSpan breakoutInterval)
 {
     _terminationCompletionSource = new TaskCompletionSource<int>();
     Scheduler = new EventExecutorTaskScheduler(this);
     _breakoutInterval = breakoutInterval;
     _workerThread = new Thread(Loop)
     {
         IsBackground = true,
         Name = string.IsNullOrEmpty(threadName) ? DefaultWorkerThreadName : threadName
     };
     _workerThread.Start();
 }
Ejemplo n.º 2
0
 public SingleThreadEventExecutor(string threadName, TimeSpan breakoutInterval)
 {
     _terminationCompletionSource = new TaskCompletionSource <int>();
     Scheduler         = new EventExecutorTaskScheduler(this);
     _breakoutInterval = breakoutInterval;
     _workerThread     = new Thread(Loop)
     {
         IsBackground = true,
         Name         = string.IsNullOrEmpty(threadName) ? DefaultWorkerThreadName : threadName
     };
     _workerThread.Start();
 }
 public TaskQueueNode(EventExecutorTaskScheduler scheduler, Task task)
 {
     _scheduler = scheduler;
     _task      = task;
 }
Ejemplo n.º 4
0
 public TaskQueueNode(EventExecutorTaskScheduler scheduler, Task task)
 {
     _scheduler = scheduler;
     _task = task;
 }