LockFreeRingBuffer
authorDelyan Kratunov <delyank@fb.com>
Fri, 29 May 2015 00:30:19 +0000 (17:30 -0700)
committerNoam Lerner <noamler@fb.com>
Wed, 3 Jun 2015 16:50:26 +0000 (09:50 -0700)
commitfff701bfc7db2f23becae9da222a63a7ad86177b
tree4029d9d3782ccccd68c22b6b83a5dd9d09e95900
parenta95dbe434014196d44fa03d0f60d5efef662fd20
LockFreeRingBuffer

Summary:
This introduces a lock-free ring buffer with the following expected semantics:

1. Writers can't block on readers
2. Writers are mostly lock-free
3. Readers can detect if they're being too slow
4. Be usable on Android (TBD but should work as-is with the armeabi-v7a ABI; armeabi (ARMv5) support is explicitly a non-goal)

Non-goals:
1. Match MPMCQueue in level of optimization. There's no need for that yet.

Test Plan: iloveunittests

Reviewed By: ngbronson@fb.com

Subscribers: trunkagent, folly-diffs@, yfeldblum, chalfant

FB internal diff: D2037718

Signature: t1:2037718:1432850250:c57963510d8cda58edc006f4c3260f5ac34d4996
folly/Makefile.am
folly/detail/TurnSequencer.h
folly/experimental/LockFreeRingBuffer.h [new file with mode: 0644]
folly/experimental/test/LockFreeRingBufferTest.cpp [new file with mode: 0644]