Merge pull request #20665 from guantaol/remove_parameter

Remove an unused parameter in ThreadPoolWorker constructor
pull/20769/head
Guantao Liu 6 years ago committed by GitHub
commit 7f307da6ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/core/lib/iomgr/executor/threadpool.cc
  2. 5
      src/core/lib/iomgr/executor/threadpool.h

@ -58,8 +58,7 @@ void ThreadPool::SharedThreadPoolConstructor() {
threads_ = static_cast<ThreadPoolWorker**>(
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);
threads_[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