Пример #1
0
        private void DoManyJobs(BlockingCollectionQueue jobQueue)
        {
            Action doNothing = () => { };

            for (int i = 0; i < _jobSize - 1; i++)
            {
                jobQueue.Enqueue(doNothing);
            }
            jobQueue.Enqueue(() => _autoResetEvent.Set());
            _autoResetEvent.WaitOne();
        }
Пример #2
0
 public void Setup() => _blockingCollectionQueue = new BlockingCollectionQueue();