]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/simple: wait dispatch_queue until all pipes closed 9930/head
authorHaomai Wang <haomai@xsky.com>
Sat, 25 Jun 2016 05:25:51 +0000 (13:25 +0800)
committerHaomai Wang <haomai@xsky.com>
Wed, 17 Aug 2016 08:59:36 +0000 (16:59 +0800)
commit4ee47ab06228f7783877c2327ff70bcbc953c49a
treeac4c525d8be5bd94a7330beae6a57a1ed987bbd8
parente354918ec8da6b6990251d9e07b4eede35ba5778
msg/simple: wait dispatch_queue until all pipes closed

Now we use dispatch_queue.wait to wait for SimpleMessenger shutdown,
but we need to ensure DispatchQueue can process event after Accepter down,
Otherwise accepter may continue to accept new connection which may queue
new item. so we can't rely on DispatchQueue now.

Introduce stop_cond and stop flag to indicate this function like
AsyncMessenger did

Fixes: http://tracker.ceph.com/issues/16472
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/msg/simple/SimpleMessenger.cc
src/msg/simple/SimpleMessenger.h