oslo.concurrency/oslo_concurrency/tests
Romain Poupin a9ccf0a64d Add support for non-blocking locks
This adds support for a non-blocking behavior of the lock : the context-based
lock now raises an AcquireLockFailedException if the lock can't be acquired on
the first try.

At a higher layer, we just caught this exception inside the 'synchronized'
decorator to prevent calling the wrapped function. In which case, we then
trace this acquisition failure.

For now at least, disabling blocking is not supported when using fair locks
because the ReaderWriterLock.write_lock() provided by the fasteners module
doesn't implements this behavior.

Change-Id: I409da79007c9ba4fb8585da881e3d56998b0b98b
2021-06-24 09:45:48 +02:00
..
unit Add support for non-blocking locks 2021-06-24 09:45:48 +02:00
__init__.py Monkey patch original current_thread _active 2020-05-08 19:42:26 +08:00