Nick Coghlan added the comment:

Would it be feasible to change the behaviour of non-reentrant locks such that:

1. They *do* keep track of the owning thread
2. Trying to acquire them again when the current thread already has them locked 
raises RuntimeError instead of deadlocking the way it does now?

Then they could sensibly expose the same "_is_locked()" API as RLock, while 
still disallowing reentrancy by default.

----------

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

Reply via email to