示例#1
0
 public void OnCompleted()
 {
     if (ForNextStep)
     {
         Scheduler.QueueWorkItemForNextStep(Continuation);
     }
     else
     {
         Scheduler.QueueWorkItem(Continuation);
     }
 }
示例#2
0
 void ScheduleNextStepForSchedulable(ISchedulable value)
 {
     if (value is WaitForNextStep)
     {
         _Scheduler.QueueWorkItemForNextStep(_QueueStep);
     }
     else if (value is Yield)
     {
         QueueStep();
     }
     else
     {
         var temp = _Scheduler.Start(value, TaskExecutionPolicy.RunWhileFutureLives);
         SetWakeConditionAndSubscribe(temp, true);
     }
 }
示例#3
0
文件: Util.cs 项目: jli94/Fracture
 void ISchedulable.Schedule(TaskScheduler scheduler, IFuture future)
 {
     scheduler.QueueWorkItemForNextStep(future.Complete);
 }