mirror of
https://github.com/boostorg/thread.git
synced 2026-01-23 06:02:14 +00:00
Thread: fix issue with continuation's future parameter which must taken by value.
[SVN r84979]
This commit is contained in:
@@ -33,7 +33,7 @@ int main()
|
||||
}
|
||||
{
|
||||
boost::future<int> f1 = boost::async(boost::launch::async, []() {return 123;});
|
||||
boost::future<int> f2 = f1.then([](boost::future<int>& f) {return 2*f.get(); });
|
||||
boost::future<int> f2 = f1.then([](boost::future<int> f) {return 2*f.get(); });
|
||||
int result = f2.get();
|
||||
BOOST_THREAD_LOG << "f2 " << result << BOOST_THREAD_END_LOG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user