C++スレッドライブラリTinyThread++
1981 ワード
TinyThread++はC++0 xスレッド管理クラスライブラリの互換性サブセットを実現した.
- // 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();