[Lazarus] How to PostMessage to object?
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Jun 9 12:01:42 CEST 2011
Michael Schnell <mschnell at lumino.de> hat am 9. Juni 2011 um 11:46 geschrieben:
> 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 only "specification" I found for TApplication.QueueAsyncCall is the fpdoc
entry:
Insert a given asynchronous call into the queue
Why do you think it is thread safe?
> (The list access needs to be protected even with a single worker thread,
> as the main thread removes elements in a concurrent access anyway.)
Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110609/875872a3/attachment-0003.html>
More information about the Lazarus
mailing list