简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM