(Wangle) within should raise TimedOut()
authorHannes Roth <hannesr@fb.com>
Wed, 15 Jul 2015 23:39:48 +0000 (16:39 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 Jul 2015 19:26:29 +0000 (12:26 -0700)
commit65fd92b6e94d1c66d3499871282b516b1e412eb0
treeb913e46d615d1baa542909f470ab7a8ef8297cd4
parentc23480d053e7dee1f03fdac937a31b3bae766993
(Wangle) within should raise TimedOut()

Summary: I figured it out. This works. The two extra futures are a small overhead
(just two pointers). The `Core`s are allocated anyway, so this is pretty
much optimal.

A timeout now raises on the current Future, and a fulfilled promise
cancels the timeout Future.

Reviewed By: @yfeldblum

Differential Revision: D2232463
folly/futures/Future-inl.h
folly/futures/FutureException.h
folly/futures/test/InterruptTest.cpp