• Jacob Lacouture's avatar
    Future<Try<T>> -> Future<T> · 4008ab21
    Jacob Lacouture authored
    Summary:
    future.then([] -> T)  currently returns Future<T>
    future.then([] -> Try<T>)  currently returns Future<Try<T>>
    
    This changes that behavior, such that future.then([] -> Try<T>) will
    return Future<T>.
    
    This is a more desirable interface for futures. It also simplifies
    implementation of a separate task (propagating exceptions more
    efficiently through chained callbacks) because it enables us to internally
    substitute lambdas returning T with lambdas returning Try<T>.
    
    Reviewed By: yfeldblum, ryantimwilson
    
    Differential Revision: D14318624
    
    fbshipit-source-id: 51363e82ceb86bfecf87ae661188be9ca3dd8002
    4008ab21
SemiFutureTest.cpp 30.2 KB