예제 #1
0
파일: AsyncAwait.cs 프로젝트: sq/Libraries
 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);
 }