예제 #1
0
 private static void ScheduleCallback(Action <object> callback, object state, bool lowPriority)
 {
     if (lowPriority)
     {
         IOThreadScheduler.ScheduleCallbackLowPriNoFlow(callback, state);
         return;
     }
     IOThreadScheduler.ScheduleCallbackNoFlow(callback, state);
 }
예제 #2
0
 public void Signal(bool completedSynchronously, bool result)
 {
     this.result = result;
     if (completedSynchronously)
     {
         base.Complete(true);
         return;
     }
     IOThreadScheduler.ScheduleCallbackNoFlow((object o) => ((AsyncSemaphore.SemaphoreWaiter)o).Complete(false), this);
 }
예제 #3
0
 static void ScheduleCallback(Action <object> callback, object state, bool lowPriority)
 {
     Fx.Assert(callback != null, "Cannot schedule a null callback");
     if (lowPriority)
     {
         IOThreadScheduler.ScheduleCallbackLowPriNoFlow(callback, state);
     }
     else
     {
         IOThreadScheduler.ScheduleCallbackNoFlow(callback, state);
     }
 }