rename isCreated, make it inline const

pull/20376/head
Christian Maurer 5 years ago
parent ed9ec64cea
commit bbb66caa64
  1. 4
      src/cpp/thread_manager/thread_manager.cc
  2. 2
      src/cpp/thread_manager/thread_manager.h

@ -52,7 +52,7 @@ void ThreadManager::WorkerThread::Run() {
}
bool ThreadManager::WorkerThread::isCreated() {
inline bool ThreadManager::WorkerThread::created() const {
return created_;
}
@ -191,7 +191,7 @@ void ThreadManager::MainWorkLoop() {
// Drop lock before spawning thread to avoid contention
lock.Unlock();
WorkerThread* w = new WorkerThread(this);
if (!w->isCreated()) {
if (!w->created()) {
num_pollers_--;
num_threads_--;
resource_exhausted = true;

@ -124,7 +124,7 @@ class ThreadManager {
WorkerThread(ThreadManager* thd_mgr);
~WorkerThread();
bool isCreated();
bool created() const;
private:
// Calls thd_mgr_->MainWorkLoop() and once that completes, calls
// thd_mgr_>MarkAsCompleted(this) to mark the thread as completed

Loading…
Cancel
Save