summaryrefslogtreecommitdiff
path: root/src/mongo/util/queue.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-06-13 15:13:06 -0400
committerEric Milkie <milkie@10gen.com>2012-06-13 15:13:13 -0400
commita041d4d61ae075a46cc17a1929be8eedd6586525 (patch)
tree9b0a1945e4177af9cb5b15c508c5bf7fae7c9b27 /src/mongo/util/queue.h
parentd5d9725f43b0deeeeb90b09fc2d0b53a88d8127c (diff)
downloadmongo-a041d4d61ae075a46cc17a1929be8eedd6586525.tar.gz
caveat comments for threadsafe queue peek functions
Diffstat (limited to 'src/mongo/util/queue.h')
-rw-r--r--src/mongo/util/queue.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/util/queue.h b/src/mongo/util/queue.h
index a91bf161d47..936b4ae15bd 100644
--- a/src/mongo/util/queue.h
+++ b/src/mongo/util/queue.h
@@ -134,6 +134,8 @@ namespace mongo {
return true;
}
+ // Obviously, this should only be used when you have
+ // only one consumer
bool blockingPeek(T& t, int maxSecondsToWait) {
Timer timer;
@@ -151,6 +153,8 @@ namespace mongo {
return true;
}
+ // Obviously, this should only be used when you have
+ // only one consumer
bool peek(T& t) {
scoped_lock l( _lock );