test_8586.cpp 407 B

123456789101112131415161718
  1. // Copyright (C) 2013 Vicente Botet
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/thread/thread.hpp>
  6. #include <iostream>
  7. void hello_world()
  8. {
  9. std::cout << "Hello from thread!" << std::endl;
  10. }
  11. int main()
  12. {
  13. boost::thread my_thread(&hello_world);
  14. my_thread.join();
  15. }