c++ builder / TTreahd > スレッド終了後の処理
814 ワード
動作確認
C++ Builder XE4
TThreadインスタンスを作成した側(例: Main.cpp)でTThreadインスタンス終了後の処理をする場合、スレッドの終了を検知する必要がある。
TThreadにはIsTermiantedプロパティがあるが、これはTerminate()をコールした時点でtrueになるので、実際にTThreadが終了したわけではない。
代わりの方法として3つ提案されている。
- WaitForを使う
- MsgWaitForMultipleObjectsを使う
- OnTerminateを使う
http://qiita.com/7of9/items/0b78b5ef45cf0a09a6cd
で実装したようなことはしなくても良いのかもしれない。
Author And Source
この問題について(c++ builder / TTreahd > スレッド終了後の処理), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/705e7fde472ffcc4a7b7著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .