Esempio n. 1
0
 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);
         }
     }
 }
Esempio n. 2
0
 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);
         }
     }
 }