|
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".
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3558.pdf
What do you think?
Thanks and regards,
Fernando.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk