Make folly::coro::Baton safe to await concurrently by multiple coroutines
Summary: This modifies the Baton data-structure to store a linked list of awaiters rather than storing a single awaiter. When a coroutine awaits the Baton it now does a lock-free push onto a list of awaiters. When the Baton is posted it atomically dequeues all awaiters from the list and then resumes each of them in turn. Reviewed By: andriigrynenko Differential Revision: D15310137 fbshipit-source-id: 895ebcf2b113fb270ad7abfedbaab68ea51de84c
Showing
Please register or sign in to comment