Richard Oudkerk added the comment:
> I've added a new patch, that implements a shared/exclusive lock as
> described in my comments above, for the threading and multiprocessing
> module.
The patch does not seem to touch the threading mode and does not come with
tests. I doubt the multiprocessing version is actually picklable since
self._requirement is a lambda function.
Also it would be best to avoid making multiprocessing.synchronize depend on
ctypes. (See implementation of multiprocessing.Barrier or Issue #14953.)
Personally, I would prefer to make the shared and exclusive locks attributes of
the same object, so one could do
with selock.shared:
...
with selock.exclusive:
...
----------
nosy: +sbt
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8800>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com