On Thu, Sep 23, 2010 at 6:48 PM, Michael Hanselmann <[email protected]> wrote:
> ---
>  lib/locking.py |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/lib/locking.py b/lib/locking.py
> index 9304cf9..d89388c 100644
> --- a/lib/locking.py
> +++ b/lib/locking.py
> @@ -1452,7 +1452,7 @@ class GanetiLockManager:
>     """
>     return level == LEVEL_CLUSTER and (names is None or BGL in names)
>
> -  def acquire(self, level, names, timeout=None, shared=0):
> +  def acquire(self, level, names, timeout=None, shared=0, priority=None):
>     """Acquire a set of resource locks, at the same level.
>
>     @type level: member of locking.LEVELS
> @@ -1465,6 +1465,8 @@ class GanetiLockManager:
>         an exclusive lock will be acquired
>     @type timeout: float
>     @param timeout: Maximum time to acquire all locks
> +   �...@type priority: integer
> +   �...@param priority: Priority for acquiring lock
>
>     """
>     assert level in LEVELS, "Invalid locking level %s" % level
> @@ -1483,7 +1485,8 @@ class GanetiLockManager:
>            " while owning some at a greater one")
>
>     # Acquire the locks in the set.
> -    return self.__keyring[level].acquire(names, shared=shared, 
> timeout=timeout)
> +    return self.__keyring[level].acquire(names, shared=shared, 
> timeout=timeout,
> +                                         priority=priority)
>
>   def release(self, level, names=None):
>     """Release a set of resource locks, at the same level.
> --
> 1.7.0.4

LGTM

>
>

Reply via email to