summaryrefslogtreecommitdiff
path: root/src/msg/Pipe.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/msg/Pipe.cc')
-rw-r--r--src/msg/Pipe.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/msg/Pipe.cc b/src/msg/Pipe.cc
index 50656fee53b..66b64d0097a 100644
--- a/src/msg/Pipe.cc
+++ b/src/msg/Pipe.cc
@@ -1136,6 +1136,19 @@ void Pipe::unregister_pipe()
}
}
+void Pipe::join()
+{
+ ldout(msgr->cct, 20) << "join" << dendl;
+ if (writer_thread.is_started())
+ writer_thread.join();
+ if (reader_thread.is_started())
+ reader_thread.join();
+ if (delay_thread) {
+ ldout(msgr->cct, 20) << "joining delay_thread" << dendl;
+ delay_thread->stop();
+ delay_thread->join();
+ }
+}
void Pipe::requeue_sent()
{