From: Sage Weil Date: Wed, 1 Apr 2015 00:04:07 +0000 (-0700) Subject: common/WorkQueue: add wait() X-Git-Tag: v9.1.0~324^2~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dbaf837f4efc4604c46a086fc7d4ad701994db81;p=ceph.git common/WorkQueue: add wait() Signed-off-by: Sage Weil --- diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h index 77ee6d1ab607c..cf78b2dc30294 100644 --- a/src/common/WorkQueue.h +++ b/src/common/WorkQueue.h @@ -336,6 +336,9 @@ public: void _wake() { pool->_wake(); } + void _wait() { + pool->_wait(); + } void drain() { pool->drain(this); } @@ -415,6 +418,9 @@ public: Mutex::Locker l(_lock); _cond.Signal(); } + void _wait() { + _cond.Wait(_lock); + } /// start thread pool thread void start();