|
|
|
@ -34,13 +34,9 @@ ThreadManager::WorkerThread::WorkerThread(ThreadManager* thd_mgr) |
|
|
|
|
thd_ = grpc_core::Thread( |
|
|
|
|
"grpcpp_sync_server", |
|
|
|
|
[](void* th) { static_cast<ThreadManager::WorkerThread*>(th)->Run(); }, |
|
|
|
|
this, |
|
|
|
|
&created_ |
|
|
|
|
); |
|
|
|
|
this, &created_); |
|
|
|
|
if (!created_) { |
|
|
|
|
gpr_log(GPR_ERROR, |
|
|
|
|
"Could not create grpc_sync_server worker-thread" |
|
|
|
|
); |
|
|
|
|
gpr_log(GPR_ERROR, "Could not create grpc_sync_server worker-thread"); |
|
|
|
|
} else { |
|
|
|
|
thd_.Start(); |
|
|
|
|
} |
|
|
|
@ -51,7 +47,6 @@ void ThreadManager::WorkerThread::Run() { |
|
|
|
|
thd_mgr_->MarkAsCompleted(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThreadManager::WorkerThread::~WorkerThread() { |
|
|
|
|
// Don't join until the thread is fully constructed.
|
|
|
|
|
thd_.Join(); |
|
|
|
|