Add sizeGuess() member to ProducerConsumerQueue
authorMike Curtiss <mcurtiss@fb.com>
Thu, 7 Jun 2012 07:32:14 +0000 (00:32 -0700)
committerJordan DeLong <jdelong@fb.com>
Fri, 22 Jun 2012 02:38:51 +0000 (19:38 -0700)
commitfdbbdb8f25443a74ec7f351abd9b7f13b6b78e13
treeb2972cf801436435c56a32b4cc26a2d0564c5cca
parent62072424464bf9831aa899f23484d7b8c54daac6
Add sizeGuess() member to ProducerConsumerQueue

Summary:
This is part 1 of a change to add hysteretic behavior to a blocking queue based on ProducerConsumerQueue.

Knowing the size is useful for monitoring and possibly for objects that contain a ProducerConsumerQueue.

Test Plan:
Added tiny test-case.

Tests pass

Reviewed By: delong.j@fb.com

FB internal diff: D496787
folly/ProducerConsumerQueue.h
folly/docs/ProducerConsumerQueue.md
folly/test/ProducerConsumerQueueTest.cpp