|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78243 - trunk/libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2012-04-28 12:11:04
Author: viboes
Date: 2012-04-28 12:11:03 EDT (Sat, 28 Apr 2012)
New Revision: 78243
URL: http://svn.boost.org/trac/boost/changeset/78243
Log:
Thread: Added use of macro BOOST_THREAD_MAKE_RV_REF and some traces to try to solve PGI regression test
Text files modified:
trunk/libs/thread/test/test_futures.cpp | 203 +++++++++++++++++++++------------------
1 files changed, 109 insertions(+), 94 deletions(-)
Modified: trunk/libs/thread/test/test_futures.cpp
==============================================================================
--- trunk/libs/thread/test/test_futures.cpp (original)
+++ trunk/libs/thread/test/test_futures.cpp 2012-04-28 12:11:03 EDT (Sat, 28 Apr 2012)
@@ -85,15 +85,30 @@
void test_store_value_from_thread()
{
LOG;
+ try {
boost::promise<int> pi2;
- boost::unique_future<int> fi2(pi2.get_future());
+ LOG;
+ boost::unique_future<int> fi2(BOOST_THREAD_MAKE_RV_REF(pi2.get_future()));
+ LOG;
boost::thread(set_promise_thread,&pi2);
+ LOG;
int j=fi2.get();
+ LOG;
BOOST_CHECK(j==42);
+ LOG;
BOOST_CHECK(fi2.is_ready());
+ LOG;
BOOST_CHECK(fi2.has_value());
+ LOG;
BOOST_CHECK(!fi2.has_exception());
+ LOG;
BOOST_CHECK(fi2.get_state()==boost::future_state::ready);
+ LOG;
+ }
+ catch (...)
+ {
+ BOOST_CHECK(false&&"Exception thrown");
+ }
}
@@ -101,7 +116,7 @@
{
LOG;
boost::promise<int> pi3;
- boost::unique_future<int> fi3=pi3.get_future();
+ boost::unique_future<int> fi3(BOOST_THREAD_MAKE_RV_REF(pi3.get_future()));
boost::thread(set_promise_exception_thread,&pi3);
try
{
@@ -145,7 +160,7 @@
LOG;
boost::promise<int> pi;
boost::unique_future<int> fi;
- fi=pi.get_future();
+ fi=BOOST_THREAD_MAKE_RV_REF(pi.get_future());
int i=0;
BOOST_CHECK(!fi.is_ready());
@@ -159,7 +174,7 @@
{
LOG;
boost::promise<int> pi;
- pi.get_future();
+ BOOST_THREAD_MAKE_RV_REF(pi.get_future());
try
{
@@ -177,7 +192,7 @@
LOG;
boost::promise<int> pi;
boost::unique_future<int> fi;
- fi=pi.get_future();
+ fi=BOOST_THREAD_MAKE_RV_REF(pi.get_future());
pi.set_value(42);
@@ -192,7 +207,7 @@
LOG;
boost::promise<int> pi;
boost::unique_future<int> fi;
- fi=pi.get_future();
+ fi=BOOST_THREAD_MAKE_RV_REF(pi.get_future());
pi.set_value(42);
@@ -210,7 +225,7 @@
LOG;
// boost::promise<int> pi;
// boost::unique_future<int> fi;
-// fi=pi.get_future();
+// fi=BOOST_THREAD_MAKE_RV_REF(pi.get_future());
// pi.set_value(42);
@@ -227,7 +242,7 @@
{
LOG;
boost::packaged_task<int> pt(make_int);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
int i=0;
BOOST_CHECK(!fi.is_ready());
BOOST_CHECK(!fi.has_value());
@@ -240,7 +255,7 @@
{
LOG;
boost::packaged_task<int> pt(make_int);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt();
@@ -291,7 +306,7 @@
{
LOG;
boost::packaged_task<int> pt(throw_runtime_error);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt();
@@ -319,7 +334,7 @@
{
LOG;
boost::promise<void> p;
- boost::unique_future<void> f=p.get_future();
+ boost::unique_future<void> f(BOOST_THREAD_MAKE_RV_REF(p.get_future()));
p.set_value();
BOOST_CHECK(f.is_ready());
BOOST_CHECK(f.has_value());
@@ -332,7 +347,7 @@
{
LOG;
boost::promise<int&> p;
- boost::unique_future<int&> f=p.get_future();
+ boost::unique_future<int&> f(BOOST_THREAD_MAKE_RV_REF(p.get_future()));
int i=42;
p.set_value(i);
BOOST_CHECK(f.is_ready());
@@ -349,7 +364,7 @@
{
LOG;
boost::packaged_task<void> pt(do_nothing);
- boost::unique_future<void> fi=pt.get_future();
+ boost::unique_future<void> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt();
@@ -370,7 +385,7 @@
{
LOG;
boost::packaged_task<int&> pt(return_ref);
- boost::unique_future<int&> fi=pt.get_future();
+ boost::unique_future<int&> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt();
@@ -406,7 +421,7 @@
{
LOG;
boost::packaged_task<int> pt(make_int);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::shared_future<int> sf(::cast_to_rval(fi));
boost::shared_future<int> sf2(sf);
@@ -445,7 +460,7 @@
{
LOG;
boost::packaged_task<int> pt(make_int);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::shared_future<int> sf;
sf=::cast_to_rval(fi);
@@ -461,7 +476,7 @@
{
LOG;
boost::packaged_task<void> pt(do_nothing);
- boost::unique_future<void> fi=pt.get_future();
+ boost::unique_future<void> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::shared_future<void> sf(::cast_to_rval(fi));
BOOST_CHECK(fi.get_state()==boost::future_state::uninitialized);
@@ -479,7 +494,7 @@
{
LOG;
boost::promise<int&> p;
- boost::shared_future<int&> f(p.get_future());
+ boost::shared_future<int&> f(BOOST_THREAD_MAKE_RV_REF(p.get_future()));
int i=42;
p.set_value(i);
BOOST_CHECK(f.is_ready());
@@ -493,10 +508,10 @@
{
LOG;
boost::promise<int> pi;
- boost::unique_future<int> fi=pi.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pi.get_future()));
boost::promise<int> pi2(::cast_to_rval(pi));
- boost::unique_future<int> fi2=pi.get_future();
+ boost::unique_future<int> fi2(BOOST_THREAD_MAKE_RV_REF(pi.get_future()));
pi2.set_value(3);
BOOST_CHECK(fi.is_ready());
@@ -511,10 +526,10 @@
{
LOG;
boost::promise<void> pi;
- boost::unique_future<void> fi=pi.get_future();
+ boost::unique_future<void> fi(BOOST_THREAD_MAKE_RV_REF(pi.get_future()));
boost::promise<void> pi2(::cast_to_rval(pi));
- boost::unique_future<void> fi2=pi.get_future();
+ boost::unique_future<void> fi2(BOOST_THREAD_MAKE_RV_REF(pi.get_future()));
pi2.set_value();
BOOST_CHECK(fi.is_ready());
@@ -527,7 +542,7 @@
{
LOG;
boost::promise<X> pt;
- boost::unique_future<X> fi=pt.get_future();
+ boost::unique_future<X> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt.set_value(X());
X res(fi.get());
@@ -538,14 +553,14 @@
{
LOG;
boost::promise<std::string> pt;
- boost::unique_future<std::string> fi=pt.get_future();
+ boost::unique_future<std::string> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt.set_value(std::string("hello"));
std::string res(fi.get());
BOOST_CHECK(res=="hello");
boost::promise<std::string> pt2;
- fi=pt2.get_future();
+ fi=BOOST_THREAD_MAKE_RV_REF(pt2.get_future());
std::string const s="goodbye";
@@ -554,7 +569,7 @@
BOOST_CHECK(res=="goodbye");
boost::promise<std::string> pt3;
- fi=pt3.get_future();
+ fi=BOOST_THREAD_MAKE_RV_REF(pt3.get_future());
std::string s2="foo";
@@ -590,7 +605,7 @@
LOG;
callback_called=0;
boost::promise<int> pi;
- boost::unique_future<int> fi=pi.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pi.get_future()));
pi.set_wait_callback(wait_callback);
fi.wait();
BOOST_CHECK(callback_called);
@@ -605,7 +620,7 @@
LOG;
callback_called=0;
boost::promise<int> pi;
- boost::unique_future<int> fi=pi.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pi.get_future()));
pi.set_wait_callback(do_nothing_callback);
bool success=fi.timed_wait(boost::posix_time::milliseconds(10));
BOOST_CHECK(callback_called);
@@ -644,7 +659,7 @@
LOG;
callback_called=0;
boost::packaged_task<int> pt(make_int);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
pt.set_wait_callback(wait_callback_for_task);
fi.wait();
BOOST_CHECK(callback_called);
@@ -659,7 +674,7 @@
LOG;
boost::packaged_task<int> pt(make_int);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
BOOST_CHECK(!fi.is_ready());
@@ -689,7 +704,7 @@
{
boost::promise<int> p;
- f=p.get_future();
+ f=BOOST_THREAD_MAKE_RV_REF(p.get_future());
}
BOOST_CHECK(f.is_ready());
BOOST_CHECK(f.has_exception());
@@ -709,7 +724,7 @@
{
boost::packaged_task<int> p(make_int);
- f=p.get_future();
+ f=BOOST_THREAD_MAKE_RV_REF(p.get_future());
}
BOOST_CHECK(f.is_ready());
BOOST_CHECK(f.has_exception());
@@ -732,9 +747,9 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::thread(::cast_to_rval(pt));
@@ -750,9 +765,9 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::thread(::cast_to_rval(pt2));
@@ -768,11 +783,11 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::thread(::cast_to_rval(pt));
@@ -789,11 +804,11 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::thread(::cast_to_rval(pt2));
@@ -810,11 +825,11 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::thread(::cast_to_rval(pt3));
@@ -831,13 +846,13 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::thread(::cast_to_rval(pt));
@@ -855,13 +870,13 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::thread(::cast_to_rval(pt2));
@@ -879,13 +894,13 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::thread(::cast_to_rval(pt3));
@@ -903,13 +918,13 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::thread(::cast_to_rval(pt4));
@@ -927,15 +942,15 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::packaged_task<int> pt5(make_int_slowly);
- boost::unique_future<int> f5(pt5.get_future());
+ boost::unique_future<int> f5(BOOST_THREAD_MAKE_RV_REF(pt5.get_future()));
boost::thread(::cast_to_rval(pt));
@@ -954,15 +969,15 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::packaged_task<int> pt5(make_int_slowly);
- boost::unique_future<int> f5(pt5.get_future());
+ boost::unique_future<int> f5(BOOST_THREAD_MAKE_RV_REF(pt5.get_future()));
boost::thread(::cast_to_rval(pt2));
@@ -980,15 +995,15 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::packaged_task<int> pt5(make_int_slowly);
- boost::unique_future<int> f5(pt5.get_future());
+ boost::unique_future<int> f5(BOOST_THREAD_MAKE_RV_REF(pt5.get_future()));
boost::thread(::cast_to_rval(pt3));
@@ -1006,15 +1021,15 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::packaged_task<int> pt5(make_int_slowly);
- boost::unique_future<int> f5(pt5.get_future());
+ boost::unique_future<int> f5(BOOST_THREAD_MAKE_RV_REF(pt5.get_future()));
boost::thread(::cast_to_rval(pt4));
@@ -1032,15 +1047,15 @@
{
LOG;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> f1(pt.get_future());
+ boost::unique_future<int> f1(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> f2(pt2.get_future());
+ boost::unique_future<int> f2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
boost::packaged_task<int> pt3(make_int_slowly);
- boost::unique_future<int> f3(pt3.get_future());
+ boost::unique_future<int> f3(BOOST_THREAD_MAKE_RV_REF(pt3.get_future()));
boost::packaged_task<int> pt4(make_int_slowly);
- boost::unique_future<int> f4(pt4.get_future());
+ boost::unique_future<int> f4(BOOST_THREAD_MAKE_RV_REF(pt4.get_future()));
boost::packaged_task<int> pt5(make_int_slowly);
- boost::unique_future<int> f5(pt5.get_future());
+ boost::unique_future<int> f5(BOOST_THREAD_MAKE_RV_REF(pt5.get_future()));
boost::thread(::cast_to_rval(pt5));
@@ -1060,9 +1075,9 @@
LOG;
callback_called=0;
boost::packaged_task<int> pt(make_int_slowly);
- boost::unique_future<int> fi=pt.get_future();
+ boost::unique_future<int> fi(BOOST_THREAD_MAKE_RV_REF(pt.get_future()));
boost::packaged_task<int> pt2(make_int_slowly);
- boost::unique_future<int> fi2=pt2.get_future();
+ boost::unique_future<int> fi2(BOOST_THREAD_MAKE_RV_REF(pt2.get_future()));
pt.set_wait_callback(wait_callback_for_task);
boost::thread(::cast_to_rval(pt));
@@ -1083,7 +1098,7 @@
for(unsigned j=0;j<count;++j)
{
tasks[j]=boost::packaged_task<int>(make_int_slowly);
- futures[j]=tasks[j].get_future();
+ futures[j]=BOOST_THREAD_MAKE_RV_REF(tasks[j].get_future());
}
boost::thread(::cast_to_rval(tasks[i]));
@@ -1115,7 +1130,7 @@
for(unsigned j=0;j<count;++j)
{
boost::packaged_task<int> task(make_int_slowly);
- futures[j]=task.get_future();
+ futures[j]=BOOST_THREAD_MAKE_RV_REF(task.get_future());
boost::thread(::cast_to_rval(task));
}
@@ -1135,7 +1150,7 @@
for(unsigned j=0;j<count;++j)
{
boost::packaged_task<int> task(make_int_slowly);
- futures[j]=task.get_future();
+ futures[j]=BOOST_THREAD_MAKE_RV_REF(task.get_future());
boost::thread(::cast_to_rval(task));
}
@@ -1155,7 +1170,7 @@
for(unsigned j=0;j<count;++j)
{
boost::packaged_task<int> task(make_int_slowly);
- futures[j]=task.get_future();
+ futures[j]=BOOST_THREAD_MAKE_RV_REF(task.get_future());
boost::thread(::cast_to_rval(task));
}
@@ -1175,7 +1190,7 @@
for(unsigned j=0;j<count;++j)
{
boost::packaged_task<int> task(make_int_slowly);
- futures[j]=task.get_future();
+ futures[j]=BOOST_THREAD_MAKE_RV_REF(task.get_future());
boost::thread(::cast_to_rval(task));
}
@@ -1195,7 +1210,7 @@
for(unsigned j=0;j<count;++j)
{
boost::packaged_task<int> task(make_int_slowly);
- futures[j]=task.get_future();
+ futures[j]=BOOST_THREAD_MAKE_RV_REF(task.get_future());
boost::thread(::cast_to_rval(task));
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk