public void Start() { lock (this) { _running = true; foreach (var thread in _threads) { if (thread.ThreadState != ThreadState.Running) thread.Start(); } } }
internal static void IncreaseThread(WorkerThread target, int threadCount) { int increaseCount = threadCount - target.ThreadCount; if (increaseCount < 1) { return; } target.Increase(increaseCount); target.Start(); }