On Wed, 26 Jan 2011 12:58:58 +0100 Michael Schnell <[email protected]> wrote:
> On 01/26/2011 11:22 AM, Luca Olivetti wrote: > > > > My application (as almost any application I write) is based on the > > assumption that methods invoked by a timer and methods invoked by a > > thread with synchronize will never fire at once (i.e. they will be > > serialized by the main loop). > > > > Can I be 100% sure of that? > Yep. > > If the LCL would not do this this would be a bug. Timer events, > synchronized events, "procedure ... message" Events fired by > "PostMessage()" in a thread and Events fired by > Application.QueueAsyncCall are to be serialized and handled in the main > thread and thus don't preempt the usual handlers that are fired by > normal GUI events. > > I did encounter other bugs with synchronize etc, but not a bug that > results in handling an event in another thread. For completeness: If the main thread calls Synchronize then the method will be called instantly. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
