Vinay:

No, I haven't tried this in multi-threaded applications.  You're correct that this would require locks around the global data.

--Bill

On Thu, Mar 10, 2011 at 3:16 AM, Vinay Sajip <report@bugs.python.org> wrote:

Vinay Sajip <vinay_sajip@yahoo.co.uk> added the comment:

Bill,

I was looking at this patch again, and I'm not sure about thread safety. The correctness of the caching depends on manager.status, which is state which is potentially shared across threads. There are no interlocks around it, so with the patch as it stands, ISTM it's possible in a multi-threaded application to get stale information. Has your patch been used in multi-threaded applications?

----------

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue11369>
_______________________________________