Boost logo

Boost :

Subject: [boost] [thread] boost::async and launch::deferred - Runtime Error + PATCH
From: Fernando Pelliccioni (fpelliccioni_at_[hidden])
Date: 2013-03-21 19:17:18

Hi Vicente, hi all,

The following code snippet throws an exception at runtime

    boost::future<int> f1 = boost::async( boost::launch::deferred, []() {
        return 123;

    int x= f1.get(); //exception thrown

I am using Boost Trunk revision 83512
I attached a patch, but I'm not sure that's correct, I had no time to see
the full future.hpp code

I noticed that according to N3558, the future::is_ready() function should
be called "ready".

What do you think?

Thanks and regards,

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