1 /************************************************************************/
2 /*功能描述: boost thread使用实例 */
3 /*作者 : kernel_main */
4 /*创建时间: 2014.6.9 */
5 /************************************************************************/
6 #include <boost/thread.hpp>
7 #include <iostream>
8 #include <stdlib.h>
9
10 using namespace boost;
11
12 void print()
13 {
14 std::cout << "test boost thread" << std::endl;
15 }
16
17 int main()
18 {
19 boost::thread thrd(&print);
20 thrd.join();
21
22 ::system("pause");
23 return 0;
24 }