diff --git a/example/future_fallback_to.cpp b/example/future_fallback_to.cpp index 28accac6..3740d1fd 100644 --- a/example/future_fallback_to.cpp +++ b/example/future_fallback_to.cpp @@ -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 @@ -12,6 +12,7 @@ #include #include #include +#include #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION @@ -29,8 +30,10 @@ int p1() int main() { + const int number_of_tests = 100; BOOST_THREAD_LOG << " f1 = boost::async(boost::launch::async, &p1); @@ -39,6 +42,7 @@ int main() } catch (std::exception& ex) { + std::cout << "ERRORRRRR "< f1 = boost::async(boost::launch::async, &p1_ex); @@ -57,6 +62,7 @@ int main() } catch (std::exception& ex) { + std::cout << "ERRORRRRR "< #include #include #include +#include + #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION int p1() @@ -28,6 +30,7 @@ int p2(boost::future f) } catch (std::exception& ex) { + std::cout << "ERRORRRRR "< f) } catch (std::exception& ex) { + std::cout << "ERRORRRRR "< f) int main() { + const int number_of_tests = 100; BOOST_THREAD_LOG << " f1 = boost::async(boost::launch::async, &p1).share(); @@ -88,6 +96,7 @@ int main() } catch (std::exception& ex) { + std::cout << "ERRORRRRR "< #include #include #include +#include + #if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP int p1() @@ -29,7 +31,9 @@ boost::future p2() int main() { + const int number_of_tests = 100; BOOST_THREAD_LOG << " > outer_future = boost::async(boost::launch::async, &p2); @@ -39,6 +43,7 @@ int main() } catch (std::exception& ex) { + std::cout << "ERRORRRRR "< #include #include #include +#include #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION \ && ! defined BOOST_NO_CXX11_LAMBDAS int main() { + const int number_of_tests = 100; BOOST_THREAD_LOG << " shared_compute(int x) 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 f = void_compute(); @@ -68,5 +72,16 @@ int main() boost::shared_future f = shared_compute(2); std::cout << f.get() << std::endl; } + } + catch (std::exception& ex) + { + std::cout << "ERRORRRRR "<