Multi-Producer, Multi-Consumer pipeline
authorTudor Bosman <tudorb@fb.com>
Fri, 19 Jul 2013 01:05:51 +0000 (18:05 -0700)
committerSara Golemon <sgolemon@fb.com>
Wed, 28 Aug 2013 21:30:11 +0000 (14:30 -0700)
commit5f4c667266b71278ced3af90b86859f94b3ea9a8
treefba3bb161d34e5964fa9b5ffd035e84220218b44
parentff1046b8a239d5f7e58e2756f6b7eb8ec830ff61
Multi-Producer, Multi-Consumer pipeline

Summary:
A bunch of MPMCQueues linked together. Stage i produces exactly Ki (default 1)
outputs for each input. Ordering is preserved, even though stages might
produce (intermediate or final) results in parallel and in any order; we do
this by abusing the enqueueing mechanism in MPMCQueue. (Read the code for
details)

Test Plan: test added, more tests to be written before commit

Reviewed By: ngbronson@fb.com

FB internal diff: D892388
folly/MPMCPipeline.h [new file with mode: 0644]
folly/MPMCQueue.h
folly/detail/MPMCPipelineDetail.h [new file with mode: 0644]
folly/test/MPMCPipelineTest.cpp [new file with mode: 0644]