Create Async interface for Baton
Summary: Baton is the primitive that allows fibers to block. The goal of this diff is to provide an `Async` interface to blocking calls that operate on Batons. Overloading `await` directly was one option, however, there are 3 blocking baton APIs (wait, try_wait_for and try_wait_until). Morover these APIs can accept arguments (something async::await doesn't do so far) So, this diff adds a bunch of wrappers that return Async<> results that must be 'awaited' on. This keeps static-analysis happy, and performs the onFiber check. Reviewed By: yfeldblum Differential Revision: D21667887 fbshipit-source-id: 774c19d223ebb0932c043e4c09635c5e85cc8241
Showing
folly/fibers/async/Baton.h
0 → 100644
Please register or sign in to comment