[issue8800] add threading.RWLock

Richard Oudkerk report at bugs.python.org
Wed Oct 3 15:43:26 CEST 2012


Richard Oudkerk added the comment:

> Multiprocessing:  Because there is no way I know to share a list of 
> owning thread ids, this version is more limited

Why do you need a *shared* list?  I think it should be fine to use a per-process list of owning thread ids.   So the current thread owns the lock if and only if it is in the current process's list of owners.

(On Unix you should probably clear the list when you fork by using multiprocessing.util.register_after_fork() in the initializer.)

----------

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


More information about the Python-bugs-list mailing list