Wraps a IEventExecutor inside a TaskScheduler and allow scheduling of Task instances onto that executor.
Inheritance: System.Threading.Tasks.TaskScheduler
 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();
 }
Esempio 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;
 }
 public TaskQueueNode(EventExecutorTaskScheduler scheduler, Task task)
 {
     _scheduler = scheduler;
     _task = task;
 }