Remove an unused parameter in ThreadPoolWorker.

pull/20665/head
Guantao Liu 5 years ago
parent 2ba2bb402a
commit 0fd6fd9ae6
  1. 2
      src/core/lib/iomgr/executor/threadpool.cc
  2. 5
      src/core/lib/iomgr/executor/threadpool.h

@ -59,7 +59,7 @@ void ThreadPool::SharedThreadPoolConstructor() {
gpr_zalloc(num_threads_ * sizeof(ThreadPoolWorker*)));
for (int i = 0; i < num_threads_; ++i) {
threads_[i] =
New<ThreadPoolWorker>(thd_name_, this, queue_, thread_options_, i);
New<ThreadPoolWorker>(thd_name_, queue_, thread_options_, i);
threads_[i]->Start();
}
}

@ -62,9 +62,8 @@ class ThreadPoolInterface {
// NULL closure.
class ThreadPoolWorker {
public:
ThreadPoolWorker(const char* thd_name, ThreadPoolInterface* pool,
MPMCQueueInterface* queue, Thread::Options& options,
int index)
ThreadPoolWorker(const char* thd_name, MPMCQueueInterface* queue,
Thread::Options& options, int index)
: queue_(queue), thd_name_(thd_name), index_(index) {
thd_ = Thread(thd_name,
[](void* th) { static_cast<ThreadPoolWorker*>(th)->Run(); },

Loading…
Cancel
Save