Remove busy wait and support multiple wait
authorAlexander Shaposhnikov <alexshap@fb.com>
Fri, 20 Nov 2015 04:12:41 +0000 (20:12 -0800)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Fri, 20 Nov 2015 05:20:21 +0000 (21:20 -0800)
commitbadc3ebe7ef9d370e0d4b9d110f5dad6f6284d7e
tree904112129dfbe5194e554e808c0de88260175e69
parent587e4b4d914c477b79120fb6559571d2dc5d040d
Remove busy wait and support multiple wait

Summary: Remove busy wait from Future::wait.
If future.wait(timeout) has succeded we should
return a ready future, otherwise we should return a future
for the final result (not necessarily ready).

Reviewed By: yfeldblum

Differential Revision: D2646860

fb-gh-sync-id: 62671d09073ad86e84df8c9257e961d2a8c2a339
folly/futures/Future-inl.h
folly/futures/test/WaitTest.cpp