From dbaf837f4efc4604c46a086fc7d4ad701994db81 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 31 Mar 2015 17:04:07 -0700 Subject: [PATCH] common/WorkQueue: add wait() Signed-off-by: Sage Weil --- src/common/WorkQueue.h | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 2.39.5