]> git.mxchange.org Git - simgear.git/blobdiff - simgear/threads/SGQueue.hxx
Tweak HTTP code to always sleep.
[simgear.git] / simgear / threads / SGQueue.hxx
index c4fab564c36d7f9df8ee865163952e11b6e7297c..7f49b5d97f73775a38ccc8bbe9814875d43525fb 100644 (file)
@@ -386,6 +386,11 @@ public:
         return this->queue.size();
     }
 
+    void waitOnNotEmpty() {
+       SGGuard<SGMutex> g(mutex);
+       while (this->queue.empty())
+           not_empty.wait(mutex);
+    }
 private:
 
     /**