2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-24 18:32:32 +00:00

merge from develop.

This commit is contained in:
Vicente J. Botet Escriba
2015-05-28 19:59:13 +02:00
25 changed files with 436 additions and 149 deletions

View File

@@ -27,16 +27,16 @@
void p1()
{
std::cout << BOOST_CONTEXTOF << std::endl;
//std::cout << BOOST_CONTEXTOF << std::endl;
boost::this_thread::sleep_for(boost::chrono::milliseconds(30));
std::cout << BOOST_CONTEXTOF << std::endl;
//std::cout << BOOST_CONTEXTOF << std::endl;
}
void p2()
{
std::cout << BOOST_CONTEXTOF << std::endl;
//std::cout << BOOST_CONTEXTOF << std::endl;
boost::this_thread::sleep_for(boost::chrono::milliseconds(10));
std::cout << BOOST_CONTEXTOF << std::endl;
//std::cout << BOOST_CONTEXTOF << std::endl;
}
int f1()
@@ -54,7 +54,6 @@ int f2(int i)
template <class Executor>
void submit_some(boost::serial_executor<Executor>& tp)
{
std::cout << BOOST_CONTEXTOF << std::endl;
for (int i = 0; i < 3; ++i) {
std::cout << BOOST_CONTEXTOF << std::endl;
tp.submit(&p2);
@@ -63,7 +62,6 @@ void submit_some(boost::serial_executor<Executor>& tp)
std::cout << BOOST_CONTEXTOF << std::endl;
tp.submit(&p1);
}
std::cout << BOOST_CONTEXTOF << std::endl;
}
@@ -75,20 +73,17 @@ void at_th_entry(boost::basic_thread_pool& )
int test_executor_adaptor()
{
// std::cout << BOOST_CONTEXTOF << std::endl;
{
try
{
#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
// std::cout << BOOST_CONTEXTOF << std::endl;
{
boost::basic_thread_pool ea1(4);
boost::serial_executor<boost::basic_thread_pool> ea2(ea1);
submit_some(ea2);
}
#endif
// std::cout << BOOST_CONTEXTOF << std::endl;
}
catch (std::exception& ex)
{
@@ -101,7 +96,6 @@ int test_executor_adaptor()
return 2;
}
}
// std::cout << BOOST_CONTEXTOF << std::endl;
return 0;
}