#include #include #include #pragma hdrstop #define BOOST_TEST_MAIN #include using boost::thread; using boost::this_thread::sleep_for; using boost::chrono::milliseconds; using boost::chrono::system_clock; using std::cout; using std::endl; void rather_lazy_thread() { while (true) sleep_for(milliseconds(10000)); } BOOST_AUTO_TEST_CASE(try_join_test) { thread t(rather_lazy_thread); cout<<"This doesn't hang (waits 1 msec)"<