[Lazarus] How to PostMessage to object?
mschnell at lumino.de
Thu Jun 9 14:33:45 CEST 2011
On 06/09/2011 01:00 PM, Mattias Gaertner wrote:
> I made it thread safe. Please test.
I verified that it works with my thread testing project (but I did not
notice a problem before).
Did you verify that in a single worker thread situation the protection
is necessary ? The worker thread only modifies one end of the queue, the
main thread only modifies the other end. So hazards are only possible
when the queue is nearly empty. No inc or dec seems to be done, so there
are chances that it's thread safe by default.
I can't understand, why "RemoveAsyncCalls" seems to remove two entries
from the queue. Do you know what is happening there ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus