aboutsummaryrefslogtreecommitdiffstats
path: root/document/src
diff options
context:
space:
mode:
Diffstat (limited to 'document/src')
-rw-r--r--document/src/vespa/document/util/queue.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/document/src/vespa/document/util/queue.h b/document/src/vespa/document/util/queue.h
index 770acda792d..ad5ad07b8ac 100644
--- a/document/src/vespa/document/util/queue.h
+++ b/document/src/vespa/document/util/queue.h
@@ -22,15 +22,8 @@ public:
Semaphore(int count=0) : _count(count), _numWaiters(0), _lock() { }
~Semaphore() {
- // XXX alternative: assert(_numWaiters == 0)
- while (true) {
- {
- std::lock_guard guard(_lock);
- if (_numWaiters == 0) break;
- _count++;
- }
- _cond.notify_one();
- }
+ std::lock_guard guard(_lock);
+ assert(_numWaiters == 0);
}
bool wait(int ms) {