$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r86568 - trunk/libs/thread/test
From: vicente.botet_at_[hidden]
Date: 2013-11-05 18:07:28
Author: viboes
Date: 2013-11-05 18:07:28 EST (Tue, 05 Nov 2013)
New Revision: 86568
URL: http://svn.boost.org/trac/boost/changeset/86568
Log:
Thread: avoid thread ambiguity on vacpp tester.
Text files modified: 
   trunk/libs/thread/test/test_9319.cpp |    14 ++++++--------                          
   1 files changed, 6 insertions(+), 8 deletions(-)
Modified: trunk/libs/thread/test/test_9319.cpp
==============================================================================
--- trunk/libs/thread/test/test_9319.cpp	Tue Nov  5 15:14:45 2013	(r86567)
+++ trunk/libs/thread/test/test_9319.cpp	2013-11-05 18:07:28 EST (Tue, 05 Nov 2013)	(r86568)
@@ -14,9 +14,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/scoped_ptr.hpp>
 
-using namespace boost;
-
-typedef shared_ptr< promise<int> > IntPromise;
+typedef boost::shared_ptr< boost::promise<int> > IntPromise;
 
 void foo(IntPromise p)
 {
@@ -24,7 +22,7 @@
     p->set_value(123); // This line locks the future's mutex, then calls the continuation with the mutex already locked.
 }
 
-void bar(future<int> fooResult)
+void bar(boost::future<int> fooResult)
 {
     std::cout << "bar" << std::endl;
     int i = fooResult.get(); // Code hangs on this line (Due to future already being locked by the set_value call)
@@ -33,11 +31,11 @@
 
 int main()
 {
-    IntPromise p(new promise<int>());
-    thread t(boost::bind(foo, p));
-    future<int> f1 = p->get_future();
+    IntPromise p(new boost::promise<int>());
+    boost::thread t(boost::bind(foo, p));
+    boost::future<int> f1 = p->get_future();
     //f1.then(launch::deferred, boost::bind(bar, _1));
-    f1.then(launch::deferred, &bar);
+    f1.then(boost::launch::deferred, &bar);
     t.join();
 }