Exemple #1
0
 public void Add(NSOperation operation)
 {
     lock (locker)
     {
         _queue.Enqueue(operation);
     }
 }
Exemple #2
0
 private void doloop()
 {
     while (flag_continue)
     {
         if (_queue.Count == 0)
         {
             Thread.Sleep(100);
         }
         else
         {
             NSOperation item = null;
             lock (locker)
             {
                 item = _queue.Dequeue();
             }
             item.Execution();
         }
     }
 }