Skip to content

Commit

Permalink
msgr: join dispatch_thread after it completes
Browse files Browse the repository at this point in the history
This is just for completeness.  No change in behavior, since we don't
get here until the thread has signaled it is done.

Drop the destroy() overload, since we join earlier.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
Sage Weil authored and liewegas committed Feb 23, 2012
1 parent 761ecc6 commit 962aa3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/msg/SimpleMessenger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2666,6 +2666,10 @@ void SimpleMessenger::wait()
wait_cond.Wait(lock);
ldout(cct,10) << "wait: woke up" << dendl;
}

ldout(cct,10) << "wait: join dispatch thread" << dendl;
dispatch_thread.join();

ldout(cct,10) << "wait: everything stopped" << dendl;
lock.Unlock();

Expand Down
6 changes: 0 additions & 6 deletions src/msg/SimpleMessenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,6 @@ class SimpleMessenger : public Messenger {


/***** Messenger-required functions **********/
void destroy() {
if (dispatch_thread.is_started())
dispatch_thread.join();
Messenger::destroy();
}

entity_addr_t get_myaddr();
void set_ip(entity_addr_t &addr);

Expand Down

0 comments on commit 962aa3e

Please sign in to comment.