summaryrefslogtreecommitdiff
path: root/util/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/queue.h')
-rw-r--r--util/queue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/queue.h b/util/queue.h
index 6a1e33a..4223bd6 100644
--- a/util/queue.h
+++ b/util/queue.h
@@ -43,6 +43,12 @@ namespace mongo {
return _queue.empty();
}
+ size_t size() const {
+ scoped_lock l( _lock );
+ return _queue.size();
+ }
+
+
bool tryPop( T & t ) {
scoped_lock l( _lock );
if ( _queue.empty() )