Inheritance: IDisposable
Exemplo n.º 1
0
 public IDisposable Schedule(IFiber fiber, Action action, TimeSpan dueTime)
 {
     if (dueTime.TotalMilliseconds <= 0)
     {
         var pending = new PendingAction(action);
         fiber.Enqueue(pending.Execute);
         return pending;
     }
     return new TimerAction(fiber, action, dueTime);
 }
Exemplo n.º 2
0
 public IDisposable Schedule(IFiber fiber, Action action, TimeSpan dueTime)
 {
     if (dueTime.TotalMilliseconds <= 0)
     {
         var pending = new PendingAction(action);
         fiber.Enqueue(pending.Execute);
         return(pending);
     }
     return(new TimerAction(fiber, action, dueTime));
 }