Author pitrou
Recipients jyasskin, kristjan.jonsson, pitrou
Date 2010-05-24.17:51:11
SpamBayes Score 0.00471476
Marked as misclassified No
Message-id <1274723468.3200.4.camel@localhost.localdomain>
In-reply-to <1274723019.82.0.91925312787.issue8800@psf.upfronthosting.co.za>
Content
> In this case, "acquire" isn't ambiguous. All the other lock types
> actually acquire a write lock, so it makes sense to have the operation
> with the same name they use also acquire a write lock on this object.

Well, it looks like a strange kind of "consistency" to me, since other
lock types are not dual. Both posix and Java APIs don't seem to imply
that the write lock is the "default" lock in a RW lock. However, I'm not
a synchronization specialist.

> I realized that read/write locks are actually shared/exclusive locks,
> which might form the basis for a name that doesn't collide with RLock.
> Boost
> (http://www.boost.org/doc/libs/1_43_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_types.shared_mutex) uses shared_mutex for the concept, so SLock or SELock?

SELock looks ok, but I have to say that RWLock is more obvious (I don't
need to do a search to guess that RW means "read/write").
History
Date User Action Args
2010-05-24 17:51:13pitrousetrecipients: + pitrou, kristjan.jonsson, jyasskin
2010-05-24 17:51:11pitroulinkissue8800 messages
2010-05-24 17:51:11pitroucreate