[issue8800] add threading.RWLock

Kristján Valur Jónsson report at bugs.python.org
Mon Oct 1 11:49:49 CEST 2012


Kristján Valur Jónsson added the comment:

>> shared/exclusive -> abstract description of what it is

If you want to argue it this way, I counter that the attributes "shared" and "exclusive" apply to the type of "access to the protected object" you are talking about, and yet, the name suggest that they are attributes of the lock itself.

In that sense, "reader lock" and "writer lock", describe attributes of the user of the lock, and the verbs "readlock" and "writelock" describe the operation being requested.

It's simply more difficult to use the more abstract concepts 'shared' and 'exclusive' as convenient and transparent descriptors of what the thing does, and likely to just brew confusion.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8800>
_______________________________________


More information about the Python-bugs-list mailing list