Boost logo

Boost :

Subject: Re: [boost] [thread] terminating destructor
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-10-13 16:39:17

on Sat Oct 13 2012, Andrzej Krzemienski <> wrote:

> Then I referred to paper N3451 ("async and ~future"):
> Herb Sutter observes that because future's destructor blocks, the following
> code:
> {
> async( []{ f(); } );
> async( []{ g(); } );
> }
> surprisingly, is executed synchronously (i.e., we do not launch the task
> executing g() until the task executing f() has finished). He proposes a
> change to std::future to detach in destructor. I just mention it because if
> boost::future tries to follow std::future, this may become necessary one
> day.

Just so you know, that paper is already controversial in the committee
mailing lists. It will be interesting to see where consensus eventually
settles, but at this point I wouldn't bet on any particular outcome.

Dave Abrahams
BoostPro Computing                  Software Development        Training             Clang/LLVM/EDG Compilers  C++  Boost

Boost list run by bdawes at, gregod at, cpdaniel at, john at