[issue11369] Add caching for the isEnabledFor() computation

Vinay Sajip report at bugs.python.org
Thu Mar 10 11:16:35 CET 2011


Vinay Sajip <vinay_sajip at 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 at bugs.python.org>
<http://bugs.python.org/issue11369>
_______________________________________


More information about the Python-bugs-list mailing list