delphi - terminate all the threads (TThread) on closing application

后端 未结 3 513
无人及你
无人及你 2020-12-29 16:28

My application is a tcp/ip server, with main thread created only once & listening all the time. When new client connects, the main thread creates the new thread of

3条回答
  •  星月不相逢
    2020-12-29 17:24

    Sounds like this article may help

    What you'll see if you click that link:

    Using Semaphores in Delphi, Part 2: The Connection Pool

    By: Cary Jensen

    Abstract: Semaphores are used to coordinate multiple threads and processes. That semaphores provide multiple threads with simultaneous access to a shared resource is highlighted by the TFixedConnectionPool class described in this article.

提交回复
热议问题