/// <summary> /// Constructs a new ThreadedWorker with a specific amount of WorkerThreads /// </summary> /// <param name="workerCount">the amount of WorkerThreads</param> public ThreadedWorker(uint workerCount) { Logger.LogTrace($"Starting ThreadedWorker with {workerCount} WorkerThreads."); WorkerCount = workerCount; _running = true; _workers = new Thread[WorkerCount]; for (int i = 0; i < workerCount; i++) { _workers[i] = new Thread(Work); _workers[i].Start(); } DebugResponseNode = new DebugContainerResponseNode(GetType().Name, null, GetDebugResponse); }
/// <summary> /// Creates a new ResponseCache. /// </summary> public ResponseCache() { DebugResponseNode = new DebugContainerResponseNode(GetType().Name, null, GetDebugResponse); }