protected void NewThread() { lock (_threadsLock) { if (_threads.Count < _maxThreads) { ThreadPoolWorker thread = new ThreadPoolWorker(this); _threads.Add(thread); thread.Name = thread.Id + "@" + _name + "-" + _id++; thread.Start(); } else if (!_warned) { _warned = true; Log.Debug("Max threads for {0}", this); } } }
protected void NewThread() { lock (_threadsLock) { if (_threads.Count<_maxThreads) { ThreadPoolWorker thread = new ThreadPoolWorker(this); _threads.Add(thread); thread.Name = thread.Id + "@" + _name + "-" + _id++; thread.Start(); } else if (!_warned) { _warned=true; Log.Debug("Max threads for {0}",this); } } }