Kristján Valur Jónsson <krist...@ccpgames.com> added the comment: well, I'm thinking for example about threading.Condition, where Lock objects are being created and erased willy nilly. Also, locks are normally uncontested. The unconstested case is the one to optimize for. As such, the test cases are not artificial at all.
The implementers of RLock in _threadingmodule obviously thought this was important, I'm merely bringing that same benefit to the Lock object. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com