public void Start() { while (Workers.Count < WorkerCount) { DelegatedWorker <TWorkItem> worker = new DelegatedWorker <TWorkItem>(new DelegatedWorker <TWorkItem> .WorkItemConsumer(WorkItemConsumer), WorkItems); Workers.Add(worker); worker.Start(); } }
public DelegatedWorkerPool(DelegatedWorker <TWorkItem> .WorkItemConsumer workItemConsumer) { OnConsumeWorkItem = workItemConsumer; }