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