The networking_generic_switch.locking Module

class networking_generic_switch.locking.PoolLock(coordinator, locks_pool_size=1, locks_prefix='ngs-', timeout=0)

Bases: object

Tooz lock wrapper for pools of locks

If tooz coordinator is provided, it will attempt to grab any lock from a predefined set of names, with configurable set size (lock pool), and keep attempting for until given timeout is reached.