Relative Content

Tag Archive for multithreadingdelphidelphi-10.3-rio

How do I terminate a thread waiting a return

I need to terminate my running thread in a way that doesn’t cause an error or delay. The problem lies in the function “lMsg := lMsgQueue.Get(FQueueGetTimeout);”, where it will wait for the defined time (usually 5000 ms). Thus, if I need to call an external terminate, my application will be stuck waiting for the termination.