Skip to content

Commit

Permalink
Merge pull request grpc#20665 from guantaol/remove_parameter
Browse files Browse the repository at this point in the history
Remove an unused parameter in ThreadPoolWorker constructor
  • Loading branch information
guantaol authored Oct 23, 2019
2 parents 9d7e7a6 + 74ac63a commit 7f307da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/core/lib/iomgr/executor/threadpool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/core/lib/iomgr/executor/threadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); },
Expand Down

0 comments on commit 7f307da

Please sign in to comment.