Gregory P. Smith wrote:
> When I read the plain term EXCLUSIVE I read that to mean nobody else can 
> read -or- write, ie: not shared in any sense.

You're right, it's not the best term.

> Lets extend these base 
> concepts to SHARED_READ, SHARED_WRITE, EXCLUSIVE_READ, EXCLUSIVE_WRITE

EXCLUDE_WRITE might be better, since EXCLUSIVE_WRITE seems
to imply that one is writing oneself as well.

> EXCLUSIVE_READ - no others can read this buffer while this view is 
> open.

This is the one that I don't think is necessary. I don't
see a need to ever prevent others from *reading* if they
really want to and are prepared to deal with the
consequences. Most of the time the other party will be using
READ_LOCK which includes EXCLUDE_WRITE, so it will fail
if you're already holding a write lock.

So we just have

READ
WRITE
READ_LOCK = READ | EXCLUDE_WRITE
WRITE_LOCK = WRITE | EXCLUDE_WRITE

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to