<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 06/09/2011 01:00 PM, Mattias Gaertner wrote:
<blockquote
cite="mid:1711127902.221604.1307617240758.JavaMail.open-xchange@cc-app2"
type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
I made it thread safe. Please test.<br>
</blockquote>
I verified that it works with my thread testing project (but I did
not notice a problem before). <br>
<br>
Some thoughts: <br>
<br>
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. <br>
<br>
I can't understand, why "RemoveAsyncCalls" seems to remove two
entries from the queue. Do you know what is happening there ? <br>
<br>
Thanks,<br>
-Michael<br>
</body>
</html>