Is the TTimer.OnTimer event handler reentrant?

前端 未结 2 1839
小蘑菇
小蘑菇 2021-02-12 19:15

I have a TTimer in my application that fires every 2 seconds and calls my event handler, HandleTimerEvent(). The HandleTimerEvent() function modifies shared resources and can ta

2条回答
  •  后悔当初
    2021-02-12 19:36

    I use TTimer extensively. It does not queue events. If you want it to hand off to an event handler, then create a TThread that handles your events so the Timer can continue with it's work. The timer does not operate asychronously but rather synchronously.

提交回复
热议问题