diff options
author | Eric Milkie <milkie@10gen.com> | 2012-10-12 18:12:12 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-10-12 18:13:01 -0400 |
commit | c0d27d82dd8212d4af5086bad9e2993a46de56eb (patch) | |
tree | 84dfbbd22733b6548e00e4cb2c8b4b1b67241470 | |
parent | 293764a638043a01879b7e4fe65c3210186a08a4 (diff) | |
download | mongo-c0d27d82dd8212d4af5086bad9e2993a46de56eb.tar.gz |
SERVER-6925 use the size of the queue in bytes rather than number of objects when calculating cap
-rw-r--r-- | src/mongo/util/queue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/util/queue.h b/src/mongo/util/queue.h index 3bf43125ea5..1f43a0e6dee 100644 --- a/src/mongo/util/queue.h +++ b/src/mongo/util/queue.h @@ -59,7 +59,7 @@ namespace mongo { void push(T const& t) { scoped_lock l( _lock ); size_t tSize = _getSize(t); - while (_queue.size()+tSize >= _maxSize) { + while (_currentSize + tSize >= _maxSize) { _cvNoLongerFull.wait( l.boost() ); } _queue.push( t ); |