Kristján Valur Jónsson added the comment:

Perhaps I should have pointed out, for Sebastian's benefit, that my second 
patch uses "timeout" rather than "blocking" since that is the new black in 
python 3.
Also, I think the "threading" implementation shows clearly the problem of 
having two independent objects that are only losely bound by some shared common 
variables:  The threading.py version has to rely on c_types ints for the common 
counters.
If the two locks were merely two different views of a common RWLock object, 
this problem could go away, and you could have the threading.RWLock and the 
multiprocessing.RWLock be different concrete classes derived from a common base 
class.

I also think it is time to drop the "writer preference" model, since it just 
adds complexity with doubtful benefits.  Sebastian's model also does that.

I'll provide a new example patch presently.

----------

_______________________________________
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