Kristján Valur Jónsson <krist...@ccpgames.com> added the comment:

Antoine:  I agree, the semaphore is the quick and robust solution.

sbt: I see your point.  Still, I think we still may have a flaw:  The statement 
that (owned-timeouts) is never an under-estimate isn't true on modern 
architectures, I think.  The order of the atomic decrement operations in the 
code means nothing and cannot be depended on to guarantee such a claim:  The 
thread doing the reading may see the individual updates in any order, and so 
the estimate may be an over- or an underestimate.

It would fix this and simplify things a lot to take the special case for 
timeout==0 out of the code.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11618>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to