public static ChoQueue BlockingQueue(ChoQueue queue) { if (queue == null) { throw new ArgumentNullException("queue"); } return(new ChoBlockingQueue(queue)); }
public static ChoQueue Synchronized(ChoQueue queue) { if (queue == null) { throw new ArgumentNullException("queue"); } if (queue.IsBlockingQueue) { throw new ArgumentException("Can't synchronize the blocking queue."); } return(new ChoSynchronizedQueue(queue)); }
public static ChoQueue Synchronized(ChoQueue queue, object syncObject) { if (queue == null) { throw new ArgumentNullException("queue"); } if (queue.IsBlockingQueue) { throw new ArgumentException("Can't synchronize the blocking queue."); } ChoGuard.ArgumentNotNull(syncObject, "SyncObject"); return(new ChoSynchronizedQueue(queue, syncObject)); }
internal ChoBlockingQueue(ChoQueue q) { _queue = q; }
internal ChoSynchronizedQueue(ChoQueue q, object syncObject) { _queue = q; _syncRoot = syncObject; }
internal ChoSynchronizedQueue(ChoQueue q) : this(q, q.SyncRoot) { }
// Methods internal ChoQueueEnumerator(ChoQueue q) { _q = q; _index = q == null || q.Count == 0 ? -1 : 0; }