Re: [Boost-bugs] [Boost C++ Libraries] #11231: Allow to set continuation future's destructor behavior to non-blocking

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11231: Allow to set continuation future's destructor behavior to non-blocking
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-22 14:20:27


#11231: Allow to set continuation future's destructor behavior to non-blocking
--------------------------------------------+----------------------------
  Reporter: Konrad Zemek <konrad.zemek@…> | Owner: viboes
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.60.0 | Component: thread
   Version: Boost 1.58.0 | Severity: Not Applicable
Resolution: fixed | Keywords:
--------------------------------------------+----------------------------

Comment (by anonymous):

 The blocking option seems to be broken.
 Future destructor doesn't block even if BOOST_THREAD_FUTURE_BLOCKING is
 defined and the futture was obtained by a call to boost::async() with
 boost::launch::async, or by calling other_future.then().


 {{{
 int main()
 {
     {
         auto future = boost::async(boost::launch::async, []() {
             std::this_thread::sleep_for(1s);
             return 42;
         });
     } //future destructor doesn't block

     //do stuff...
     //-> will heppen before the future state is ready
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11231#comment:4>
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:19 UTC