Skip to content
Snippets Groups Projects
Commit 6d353e2a authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix mac

parent 81eceb31
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
namespace grpc { namespace grpc {
static thread_local bool g_is_dynamic_thread_pool_thread;
DynamicThreadPool::DynamicThread::DynamicThread(DynamicThreadPool* pool) DynamicThreadPool::DynamicThread::DynamicThread(DynamicThreadPool* pool)
: pool_(pool), : pool_(pool),
...@@ -51,7 +50,6 @@ DynamicThreadPool::DynamicThread::~DynamicThread() { ...@@ -51,7 +50,6 @@ DynamicThreadPool::DynamicThread::~DynamicThread() {
} }
void DynamicThreadPool::DynamicThread::ThreadFunc() { void DynamicThreadPool::DynamicThread::ThreadFunc() {
g_is_dynamic_thread_pool_thread = true;
pool_->ThreadFunc(); pool_->ThreadFunc();
// Now that we have killed ourselves, we should reduce the thread count // Now that we have killed ourselves, we should reduce the thread count
std::unique_lock<std::mutex> lock(pool_->mu_); std::unique_lock<std::mutex> lock(pool_->mu_);
...@@ -109,7 +107,6 @@ void DynamicThreadPool::ReapThreads(std::list<DynamicThread*>* tlist) { ...@@ -109,7 +107,6 @@ void DynamicThreadPool::ReapThreads(std::list<DynamicThread*>* tlist) {
} }
DynamicThreadPool::~DynamicThreadPool() { DynamicThreadPool::~DynamicThreadPool() {
GPR_ASSERT(!g_is_dynamic_thread_pool_thread);
std::unique_lock<std::mutex> lock(mu_); std::unique_lock<std::mutex> lock(mu_);
shutdown_ = true; shutdown_ = true;
cv_.notify_all(); cv_.notify_all();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment