'Try to acquire a lock on the Queue.
It does so by creating a object called \'lock\' which is locked by the
current session..
This way other nodes are not able to write to the lock object which
means that they have to wait before the lock is released.
Arguments:
queue (str): The name of the Queue.
raising (Exception): Set custom lock error class.
Raises:
LockError: if the lock cannot be acquired.
Returns:
bool: success?'

@contextmanager
def _queue_lock(self, queue, raising=LockError):

    self._acquire_lock(queue, raising=raising)
    try:
        (yield)
    finally:
        self._release_lock(queue)
