public void OnCompleted() { if (ForNextStep) { Scheduler.QueueWorkItemForNextStep(Continuation); } else { Scheduler.QueueWorkItem(Continuation); } }
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); } }
void ISchedulable.Schedule(TaskScheduler scheduler, IFuture future) { scheduler.QueueWorkItemForNextStep(future.Complete); }