Wraps a IEventExecutor inside a TaskScheduler and allow scheduling of Task instances onto that executor.
상속: System.Threading.Tasks.TaskScheduler
예제 #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();
 }
예제 #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;
 }