With what delphi Code should I replace my calls to deprecated TThread method Suspend?

后端 未结 4 1366
礼貌的吻别
礼貌的吻别 2020-12-13 15:55

It has been asked before, but without a full answer. This is to do with the so called famous \"‘Fatal threading model!’\".

I need to replace this call to TThread.Su

4条回答
  •  借酒劲吻你
    2020-12-13 16:14

    You could use an event (CreateEvent) and let the thread wait (WaitForObject) until the event is signaled (SetEvent). I know that this is a short answer, but you should be able to look these three commands up on MSDN or wherever you want. They should do the trick.

提交回复
热议问题