]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/WorkQueue: add wait()
authorSage Weil <sage@redhat.com>
Wed, 1 Apr 2015 00:04:07 +0000 (17:04 -0700)
committerSage Weil <sage@redhat.com>
Wed, 19 Aug 2015 21:03:53 +0000 (17:03 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/WorkQueue.h

index 77ee6d1ab607c1aa1eb07f8706cc6c8d86834dcc..cf78b2dc30294371b437d9371c4bfb39ee5d7171 100644 (file)
@@ -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();