extend future api with Future<T>::poll
Summary: Added folly::Future<T>::poll() function with the following semantics: poll() checks if the promise has been fulfilled, if so it will extract the value of the resulting Try<T> to construct a new Try<T> that is wrapped in an Optional<Try<T>>. If the promise has not been fulfilled an empty Optional is returned. Test Plan: Added two tests to SugarTest.cpp: one where the promise has been fulfilled and one where it hasn't. Reviewed By: hannesr@fb.com Subscribers: trunkagent, folly-diffs@, jsedgwick, arturg, yfeldblum FB internal diff: D1909480 Tasks: 6166875 Signature: t1:1909480:1426280247:6b239c0f1a15c25ce7664afb4bfb3899993c5775
Showing
Please register or sign in to comment