mirror of
https://github.com/boostorg/thread.git
synced 2026-01-25 06:42:23 +00:00
merge from develop
This commit is contained in:
@@ -84,44 +84,52 @@ int test_executor_adaptor()
|
||||
{
|
||||
try
|
||||
{
|
||||
// {
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// boost::basic_thread_pool e1;
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// boost::basic_thread_pool e2 = e1;
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// }
|
||||
{
|
||||
boost::basic_thread_pool e1;
|
||||
boost::basic_thread_pool e2 = e1;
|
||||
}
|
||||
{
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
boost::executor_adaptor < boost::basic_thread_pool > ea(4);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
submit_some( ea);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
}
|
||||
#if 1
|
||||
{
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
boost::executor_adaptor < boost::basic_thread_pool > ea(4);
|
||||
// fixme
|
||||
// ERROR= tr1::bad_weak_ptr
|
||||
{
|
||||
boost::future<int> t1 = boost::async(ea, &f1);
|
||||
boost::future<int> t2 = boost::async(ea, &f1);
|
||||
std::cout << BOOST_CONTEXTOF << " t1= " << t1.get() << std::endl;
|
||||
std::cout << BOOST_CONTEXTOF << " t2= " << t2.get() << std::endl;
|
||||
}
|
||||
// {
|
||||
// boost::future<int> t1 = boost::async(ea, &f1);
|
||||
// boost::future<int> t2 = boost::async(ea, &f1);
|
||||
// std::cout << BOOST_CONTEXTOF << " t1= " << t1.get() << std::endl;
|
||||
// std::cout << BOOST_CONTEXTOF << " t2= " << t2.get() << std::endl;
|
||||
// }
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
submit_some(ea);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
{
|
||||
boost::basic_thread_pool ea3(1);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
boost::future<int> t1 = boost::async(ea3, &f1);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
boost::future<int> t2 = boost::async(ea3, &f1);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
//boost::future<int> t2 = boost::async(ea3, f2, 1); // todo this doesn't compiles yet on C++11
|
||||
//boost::future<int> t2 = boost::async(ea3, boost::bind(f2, 1)); // todo this doesn't compiles yet on C++98
|
||||
std::cout << BOOST_CONTEXTOF << " t1= " << t1.get() << std::endl;
|
||||
std::cout << BOOST_CONTEXTOF << " t2= " << t2.get() << std::endl;
|
||||
}
|
||||
#endif
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// {
|
||||
// boost::basic_thread_pool ea3(1);
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// boost::future<int> t1 = boost::async(ea3, &f1);
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// boost::future<int> t2 = boost::async(ea3, &f1);
|
||||
// std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
// //boost::future<int> t2 = boost::async(ea3, f2, 1); // todo this doesn't compiles yet on C++11
|
||||
// //boost::future<int> t2 = boost::async(ea3, boost::bind(f2, 1)); // todo this doesn't compiles yet on C++98
|
||||
// std::cout << BOOST_CONTEXTOF << " t1= " << t1.get() << std::endl;
|
||||
// std::cout << BOOST_CONTEXTOF << " t2= " << t2.get() << std::endl;
|
||||
// }
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
submit_some(ea);
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
}
|
||||
#endif
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
{
|
||||
boost::loop_executor e1;
|
||||
@@ -187,7 +195,7 @@ int test_executor_adaptor()
|
||||
submit_some(ea1);
|
||||
}
|
||||
std::cout << BOOST_CONTEXTOF << std::endl;
|
||||
#if 1
|
||||
#if 0
|
||||
// fixme
|
||||
// ERROR= tr1::bad_weak_ptr
|
||||
{
|
||||
@@ -200,7 +208,7 @@ int test_executor_adaptor()
|
||||
{
|
||||
boost::async(&f1);
|
||||
}
|
||||
#if 1
|
||||
#if 0
|
||||
// fixme
|
||||
// ERROR= tr1::bad_weak_ptr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user