Kristján Valur Jónsson added the comment:

> We've already departed from that. Our Lock is nothing like a mutex, for
> example (it's more of a binary semaphore).

This is not by nature of good design, but an accident.  C python needed both 
mutex and signaling ability and decided that a single non-recursive lock were 
good enough for that.  This is a debatable choice since all modern systems 
consider these two different needs and provide different primitives to satisfy 
them.  The "Lock" was then exposed to Python and RLock grafted on top to fix 
the non-recursiveness problem.  Then we added signaling in the form of Events, 
Semaphores and Condition variables.
Had this ben more purposefully designed, then there would be no Lock or RLock 
in threading.py, only a Mutex.

----------

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

Reply via email to