On 05/16/2017 10:45 AM, Joshua Harlow wrote:
So fyi,
If you really want something like this:
Just use:
http://fasteners.readthedocs.io/en/latest/api/lock.html#fasteners.lock.ReaderWriterLock
And always get a write lock.
It is a slightly different way of getting those locks (via a context manager)
but the implementation underneath is a deque; so fairness should be assured in
FIFO order...
I'm going ahead and doing this. Your docs for fastener don't actually say that
lock.ReaderWriterLock.write_lock() provides fairness. If you're going to ensure
that stays true it might make sense to document the fact.
Am I correct that fasteners.InterProcessLock is basically as fair as the
underlying OS-specific lock? (Which should be reasonably fair except for
process scheduler priority.)
Chris
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev