[Boost-bugs] [Boost C++ Libraries] #8678: Async: Add future<>::fallback_to

Subject: [Boost-bugs] [Boost C++ Libraries] #8678: Async: Add future<>::fallback_to
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-09 09:56:48


#8678: Async: Add future<>::fallback_to
------------------------------+----------------------
 Reporter: viboes | Owner: anthonyw
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 Quite often the user as a fall back value that should be used when the
 future has an exception.

 This factory creates a new future that will fall back to the parameter if
 the source future will be ready with an exception. The following


 {{{
   f.fallback_to(v);
 }}}

 is a shortcut for


 {{{
   f.then([](future<T> f) {
     return f.get_or(v);
   });
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8678>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC