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).

Some thoughts:

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 ?

Thanks,
-Michael
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to