Terrasync: don't busy wait when no requests are running.

This commit is contained in:
James Turner
2013-10-28 14:51:52 +00:00
parent fdf6fc32ff
commit 2f42a8714c
2 changed files with 11 additions and 0 deletions
+5
View 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:
/**