Ejemplo n.º 1
0
 public void Add(Process process, bool highPriority)
 {
     bool queued = false;
     while (!queued) {
         try {
             lock (Busy)
                 if (highPriority)
                     _eventStackHighPriority.Push(process);
                 else
                     _eventStackLowPriority.Push(process);
             queued = true;
         } catch (ArgumentException e) {
             //The queue was full, wait for it to have more space
             Util.Wait(1);
         }
     }
 }
Ejemplo n.º 2
0
 public void Add(Process process)
 {
     Add(process, false);
 }