Nandaka.Common.LimitedConcurrencyLevelTaskScheduler.QueueTask C# (CSharp) Method

QueueTask() protected final method

protected final QueueTask ( Task task ) : void
task Task
return void
        protected override sealed void QueueTask(Task task)
        {
            // Add the task to the list of tasks to be processed.  If there aren't enough
            // delegates currently queued or running to process tasks, schedule another.
            lock (_tasks)
            {
                _tasks.AddLast(task);
                if (_delegatesQueuedOrRunning < _maxDegreeOfParallelism)
                {
                    ++_delegatesQueuedOrRunning;
                    NotifyThreadPoolOfPendingWork();
                }
            }
        }