How to kill a thread in delphi?

前端 未结 5 1373
慢半拍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:02

    Terminate does not kill a thread; it sets the Terminated property to inform the thread that it needs to terminate. It's the thread's responsibility to watch for Terminated and shut itself down gracefully.

提交回复
热议问题