Ejemplo n.º 1
0
 /// <summary>
 /// Add an action to be run in the sequence and ensure the sequence is running.
 /// </summary>
 public void AddRun(Action action)
 {
     _queue.Enqueue(new ActionSet(action));
     if (Interlocked.CompareExchange(ref _running, 1, 0) == 0)
     {
         Needle.AddSingle(Next);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Run a single set of arguments.
 /// </summary>
 public void Run()
 {
     // is there another set of arguments?
     if (_argsSet.Dequeue())
     {
         // run the action
         Needle.AddSingle(Action);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Run a single set of arguments.
 /// </summary>
 public void Run()
 {
     Needle.AddSingle(_action);
 }