diff --git a/src/cpp/server/dynamic_thread_pool.cc b/src/cpp/server/dynamic_thread_pool.cc index 0361768c04eed9b7e65bd528d8ccc7a6f5923ad7..afb5beaadece3c04d827e40d21e60e33794424e9 100644 --- a/src/cpp/server/dynamic_thread_pool.cc +++ b/src/cpp/server/dynamic_thread_pool.cc @@ -39,7 +39,6 @@ #include <grpc/support/log.h> namespace grpc { -static thread_local bool g_is_dynamic_thread_pool_thread; DynamicThreadPool::DynamicThread::DynamicThread(DynamicThreadPool* pool) : pool_(pool), @@ -51,7 +50,6 @@ DynamicThreadPool::DynamicThread::~DynamicThread() { } void DynamicThreadPool::DynamicThread::ThreadFunc() { - g_is_dynamic_thread_pool_thread = true; pool_->ThreadFunc(); // Now that we have killed ourselves, we should reduce the thread count std::unique_lock<std::mutex> lock(pool_->mu_); @@ -109,7 +107,6 @@ void DynamicThreadPool::ReapThreads(std::list<DynamicThread*>* tlist) { } DynamicThreadPool::~DynamicThreadPool() { - GPR_ASSERT(!g_is_dynamic_thread_pool_thread); std::unique_lock<std::mutex> lock(mu_); shutdown_ = true; cv_.notify_all();