locking: Method to check if LockSet is fully acquired
authorMichael Hanselmann <hansmi@google.com>
Mon, 26 Nov 2012 05:34:52 +0000 (06:34 +0100)
committerMichael Hanselmann <hansmi@google.com>
Mon, 26 Nov 2012 11:26:01 +0000 (12:26 +0100)
commit8c811986acd5e9298f981182aa23bdb28143977f
tree3a6bcd7dc5436fc028953184423e1af1d038cf89
parent46cde4712c5ed75924349e941a549a7dd00057e2
locking: Method to check if LockSet is fully acquired

A new method is added to check whether the LockSet-internal lock is
held. This is the case after LockSet.acquire was called with
locking.ALL_SET.

Unit tests are updated, including one where the list of names must be
empty.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
lib/locking.py
test/ganeti.locking_unittest.py