|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86732 - branches/release/libs/thread/example
From: vicente.botet_at_[hidden]
Date: 2013-11-16 19:32:28
Author: viboes
Date: 2013-11-16 19:32:28 EST (Sat, 16 Nov 2013)
New Revision: 86732
URL: http://svn.boost.org/trac/boost/changeset/86732
Log:
Thread: increase the number of cycles of the failing tests.
Text files modified:
branches/release/libs/thread/example/future_fallback_to.cpp | 8 +++++++-
branches/release/libs/thread/example/future_then.cpp | 11 ++++++++++-
branches/release/libs/thread/example/future_unwrap.cpp | 7 ++++++-
branches/release/libs/thread/example/lambda_future.cpp | 6 +++++-
branches/release/libs/thread/example/make_future.cpp | 15 +++++++++++++++
5 files changed, 43 insertions(+), 4 deletions(-)
Modified: branches/release/libs/thread/example/future_fallback_to.cpp
==============================================================================
--- branches/release/libs/thread/example/future_fallback_to.cpp Sat Nov 16 16:39:01 2013 (r86731)
+++ branches/release/libs/thread/example/future_fallback_to.cpp 2013-11-16 19:32:28 EST (Sat, 16 Nov 2013) (r86732)
@@ -4,7 +4,7 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
+//#define BOOST_THREAD_USES_LOG
#define BOOST_THREAD_USES_LOG_THREAD_ID
#include <boost/thread/detail/log.hpp>
@@ -12,6 +12,7 @@
#include <boost/assert.hpp>
#include <exception>
#include <string>
+#include <iostream>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
@@ -29,8 +30,10 @@
int main()
{
+ const int number_of_tests = 100;
BOOST_THREAD_LOG << "<MAIN" << BOOST_THREAD_END_LOG;
{
+ for (int i=0; i< number_of_tests; i++)
try
{
boost::future<int> f1 = boost::async(boost::launch::async, &p1);
@@ -39,6 +42,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
return 1;
}
@@ -49,6 +53,7 @@
}
}
{
+ for (int i=0; i< number_of_tests; i++)
try
{
boost::future<int> f1 = boost::async(boost::launch::async, &p1_ex);
@@ -57,6 +62,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
return 1;
}
Modified: branches/release/libs/thread/example/future_then.cpp
==============================================================================
--- branches/release/libs/thread/example/future_then.cpp Sat Nov 16 16:39:01 2013 (r86731)
+++ branches/release/libs/thread/example/future_then.cpp 2013-11-16 19:32:28 EST (Sat, 16 Nov 2013) (r86732)
@@ -4,13 +4,15 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
+//#define BOOST_THREAD_USES_LOG
#define BOOST_THREAD_USES_LOG_THREAD_ID
#include <boost/thread/detail/log.hpp>
#include <boost/thread/future.hpp>
#include <boost/assert.hpp>
#include <string>
+#include <iostream>
+
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
int p1()
@@ -28,6 +30,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
BOOST_ASSERT(false);
}
@@ -47,6 +50,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
BOOST_ASSERT(false);
}
@@ -60,7 +64,9 @@
int main()
{
+ const int number_of_tests = 100;
BOOST_THREAD_LOG << "<MAIN" << BOOST_THREAD_END_LOG;
+ for (int i=0; i< number_of_tests; i++)
{
try
{
@@ -70,6 +76,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
return 1;
}
@@ -80,6 +87,7 @@
}
}
{
+ for (int i=0; i< number_of_tests; i++)
try
{
boost::shared_future<int> f1 = boost::async(boost::launch::async, &p1).share();
@@ -88,6 +96,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
return 1;
}
Modified: branches/release/libs/thread/example/future_unwrap.cpp
==============================================================================
--- branches/release/libs/thread/example/future_unwrap.cpp Sat Nov 16 16:39:01 2013 (r86731)
+++ branches/release/libs/thread/example/future_unwrap.cpp 2013-11-16 19:32:28 EST (Sat, 16 Nov 2013) (r86732)
@@ -4,13 +4,15 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
+//#define BOOST_THREAD_USES_LOG
#define BOOST_THREAD_USES_LOG_THREAD_ID
#include <boost/thread/detail/log.hpp>
#include <boost/thread/future.hpp>
#include <boost/assert.hpp>
#include <string>
+#include <iostream>
+
#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
int p1()
@@ -29,7 +31,9 @@
int main()
{
+ const int number_of_tests = 100;
BOOST_THREAD_LOG << "<MAIN" << BOOST_THREAD_END_LOG;
+ for (int i=0; i< number_of_tests; i++)
try
{
boost::future<boost::future<int> > outer_future = boost::async(boost::launch::async, &p2);
@@ -39,6 +43,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
return 1;
}
Modified: branches/release/libs/thread/example/lambda_future.cpp
==============================================================================
--- branches/release/libs/thread/example/lambda_future.cpp Sat Nov 16 16:39:01 2013 (r86731)
+++ branches/release/libs/thread/example/lambda_future.cpp 2013-11-16 19:32:28 EST (Sat, 16 Nov 2013) (r86732)
@@ -9,21 +9,24 @@
#define BOOST_RESULT_OF_USE_DECLTYPE
#endif
#define BOOST_THREAD_VERSION 4
-#define BOOST_THREAD_USES_LOG
+//#define BOOST_THREAD_USES_LOG
#define BOOST_THREAD_USES_LOG_THREAD_ID
#include <boost/thread/detail/log.hpp>
#include <boost/thread/future.hpp>
#include <boost/assert.hpp>
#include <string>
+#include <iostream>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION \
&& ! defined BOOST_NO_CXX11_LAMBDAS
int main()
{
+ const int number_of_tests = 100;
BOOST_THREAD_LOG << "<MAIN" << BOOST_THREAD_END_LOG;
+ for (int i=0; i< number_of_tests; i++)
try
{
{
@@ -40,6 +43,7 @@
}
catch (std::exception& ex)
{
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
BOOST_THREAD_LOG << "ERRORRRRR "<<ex.what() << "" << BOOST_THREAD_END_LOG;
return 1;
}
Modified: branches/release/libs/thread/example/make_future.cpp
==============================================================================
--- branches/release/libs/thread/example/make_future.cpp Sat Nov 16 16:39:01 2013 (r86731)
+++ branches/release/libs/thread/example/make_future.cpp 2013-11-16 19:32:28 EST (Sat, 16 Nov 2013) (r86732)
@@ -50,6 +50,10 @@
int main()
{
+ const int number_of_tests = 100;
+ for (int i=0; i< number_of_tests; i++)
+ try
+ {
#if defined BOOST_THREAD_USES_MOVE
{
boost::future<void> f = void_compute();
@@ -68,5 +72,16 @@
boost::shared_future<int> f = shared_compute(2);
std::cout << f.get() << std::endl;
}
+ }
+ catch (std::exception& ex)
+ {
+ std::cout << "ERRORRRRR "<<ex.what() << "" << std::endl;
+ return 1;
+ }
+ catch (...)
+ {
+ std::cout << "ERRORRRRR "<<"ERRORRRRR exception thrown" << std::endl;
+ return 2;
+ }
return 0;
}
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