Search code examples
delphisynchronizationttimer

Do I need to call Synchronize from TTimer events?


When I access global variables or the VCL from a TTimer, do I need to use Synchronize? I use the same variables and objects from a TThread, where I already use synchronization.


Solution

  • TTimer's OnTimer event is executed under the main thread. You don't have to synchronize access to VCL inside that event