[Lazarus] How to PostMessage to object?

Michael Schnell mschnell at lumino.de
Thu Jun 9 11:46:40 CEST 2011


On 06/09/2011 10:58 AM, Henry Vermaak wrote:
> You will corrupt the linked list that QueueAsyncCall() uses when you 
> call it from multiple threads, so you _must_ protect it.
As QueueAsyncCall is specified exactly for this use, it needs to take 
care of this issue internally. Otherwise it obviously is buggy. I trust 
that the LCL developers did a decent job.

(The list access needs to be protected even with a single worker thread, 
as the main thread removes elements in a concurrent access anyway.)

-Michael





More information about the Lazarus mailing list