public DynamicTaskExecutor(int initialProcessorCount, int maxProcessorCount, int maxQueueSize, ParkStrategy parkStrategy, string processorThreadNamePrefix, System.Func <LOCAL> initialLocalState) { this._maxProcessorCount = maxProcessorCount == 0 ? int.MaxValue : maxProcessorCount; Debug.Assert(this._maxProcessorCount >= initialProcessorCount, "Unexpected initial processor count " + initialProcessorCount + " for max " + maxProcessorCount); this._parkStrategy = parkStrategy; this._processorThreadNamePrefix = processorThreadNamePrefix; this._initialLocalState = initialLocalState; this._queue = new ArrayBlockingQueue <Task <LOCAL> >(maxQueueSize); Processors(initialProcessorCount); }
public DynamicTaskExecutor(int initialProcessorCount, int maxProcessorCount, int maxQueueSize, ParkStrategy parkStrategy, string processorThreadNamePrefix) : this(initialProcessorCount, maxProcessorCount, maxQueueSize, parkStrategy, processorThreadNamePrefix, Suppliers.singleton(null)) { }