Adding support for in-place use of ProducerConsumerQueue.
authorTom Jackson <tjackson@fb.com>
Mon, 4 Jun 2012 23:57:49 +0000 (16:57 -0700)
committerTudor Bosman <tudorb@fb.com>
Tue, 5 Jun 2012 02:21:47 +0000 (19:21 -0700)
commitc51f93205176b9bb3792a1c8bedcf5228ce669ac
treee55b3bd17106db8f1471ac749b0370a7b9476ee5
parentf389df4f9036c68a19a7987cf3ac2c3bad55fb9d
Adding support for in-place use of ProducerConsumerQueue.

Summary: As it is, ProducerConsumerQueue requires that values are moved or copied on the way out of the queue. It would be nice if it was possible to get a reference to the front of the queue, use it in place, then destruct it.

Test Plan: Unit tests

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