public override void Enqueue(T1 item) { lock (_syncRoot) { _queue.Enqueue(item); } }
public override void Enqueue(T1 item, int millisecondsTimeout) { using (ChoBarrier highBarrier = ChoBarrier.HighBarrier(_barrier)) { if (!highBarrier.Wait(millisecondsTimeout)) { throw new ChoQueueTimeoutException(); } _queue.Enqueue(item); } }