TinyThread++ 实现了C++0x 线程管理类库的一个兼容子集。
- // Thread function
- void MyThread(void * arg)
- {
- // Do child thread stuff
- }
- // Start the child thread
- thread t(MyThread, 0);
- // Do main thread stuff
- // ...
- // Wait for the child thread to finish
- t.join();
转载于:https://blog.51cto.com/nbaiwan/1125561