internal static void IncreaseThread(WorkerThread target, int threadCount) { int increaseCount = threadCount - target.ThreadCount; if (increaseCount < 1) { return; } target.Increase(increaseCount); target.Start(); }
internal static void Initialize(Int32 workerThreadCount, Int32 dispatchThreadCount) { if (workerThreadCount < -1 || dispatchThreadCount < -1) { throw new AegisException(AegisResult.InvalidArgument); } WorkerThreadCount = workerThreadCount; if (WorkerThreadCount > 0) { _workerThread.Start(WorkerThreadCount); } DispatchThreadCount = dispatchThreadCount; if (DispatchThreadCount > 0) { _dispatchThread.Start(DispatchThreadCount); } }
internal static void IncreaseThread(WorkerThread target, int threadCount) { int increaseCount = threadCount - target.ThreadCount; if (increaseCount < 1) return; target.Increase(increaseCount); target.Start(); }