How to kill a thread in delphi?

前端 未结 5 1365
慢半拍i
慢半拍i 2020-12-01 05:26

In delphi, a method in TThread is terminate. It seems a subthread can not kill another thread by calling terminate or free. For example A(main form), B (a thread unit), C (a

5条回答
  •  眼角桃花
    2020-12-01 06:28

    All the Terminate method does is it sets the Terminated property to true. So you have to manually keep checking that property and then exit the thread method when it is set to true.

提交回复
热议问题