Creating a flatten() method to get the inner Future<T> value out of a Future<Future...
authorDor Gross <dor@fb.com>
Sat, 28 Feb 2015 01:17:18 +0000 (17:17 -0800)
committerAlecs King <int@fb.com>
Tue, 3 Mar 2015 03:31:01 +0000 (19:31 -0800)
commit1f6e3142e942cd01fa6eb07f2eb2613f31f5e941
treea9760524d0abb8b6c1aa76ee3eff40c20f45f07e
parent6b9d347fc4029627327aa53f3f99d1055e987746
Creating a flatten() method to get the inner Future<T> value out of a Future<Future<T>>.

Summary: Method will only be applicable for types of the form Future<Future<T>>, calling flatten() on a Future<T> where <T> != Future<R> for any <R> will result with a compile time error.

Test Plan: Added tests in FutureTest.cpp.

Reviewed By: hans@fb.com

Subscribers: ldbrandy, trunkagent, folly-diffs@, jsedgwick, yfeldblum, icanadi

FB internal diff: D1843581

Tasks: 6166903

Signature: t1:1843581:1424399517:7146924db3c238b77dd309f1d5916e44a7e81968
folly/futures/Future-inl.h
folly/futures/Future.h
folly/futures/test/FutureTest.cpp