|  | @@ -34,12 +34,8 @@ ThreadManager::WorkerThread::WorkerThread(ThreadManager* thd_mgr)
 | 
	
		
			
				|  |  |    thd_ = grpc_core::Thread(
 | 
	
		
			
				|  |  |        "grpcpp_sync_server",
 | 
	
		
			
				|  |  |        [](void* th) { static_cast<ThreadManager::WorkerThread*>(th)->Run(); },
 | 
	
		
			
				|  |  | -      this, &created_);
 | 
	
		
			
				|  |  | -  if (!created_) {
 | 
	
		
			
				|  |  | -    gpr_log(GPR_ERROR, "Could not create grpc_sync_server worker-thread");
 | 
	
		
			
				|  |  | -  } else {
 | 
	
		
			
				|  |  | -    thd_.Start();
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | +      this);
 | 
	
		
			
				|  |  | +  thd_.Start();
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  void ThreadManager::WorkerThread::Run() {
 | 
	
	
		
			
				|  | @@ -181,12 +177,7 @@ void ThreadManager::MainWorkLoop() {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              // Drop lock before spawning thread to avoid contention
 | 
	
		
			
				|  |  |              lock.Unlock();
 | 
	
		
			
				|  |  | -            WorkerThread* w = new WorkerThread(this);
 | 
	
		
			
				|  |  | -            if (!w->created()) {
 | 
	
		
			
				|  |  | -              num_pollers_--;
 | 
	
		
			
				|  |  | -              num_threads_--;
 | 
	
		
			
				|  |  | -              resource_exhausted = true;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +            new WorkerThread(this);
 | 
	
		
			
				|  |  |            } else if (num_pollers_ > 0) {
 | 
	
		
			
				|  |  |              // There is still at least some thread polling, so we can go on
 | 
	
		
			
				|  |  |              // even though we are below the number of pollers that we would
 |