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-07-13 10:49:04


#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):

 Replying to [comment:4 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
> }
> }}}

 The future destructor is never called even though the variable 'future'
 goes out of scope. See ticket #12220 for details.

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