'Acquire the desired quota, if any.
This is thread-safe and will block until it can be satisified.
Args:
who: [string] Who is asking, for logging purposes.
quota: [dict] The desired quota for each keyed resource, if any.
Returns:
The quota acquired.'

def acquire_all_safe(self, who, quota):

    got = None
    with self.__condition_variable:
        got = self.acquire_all_or_none_unsafe(who, quota)
        while (got is None):
            logging.info('"%s"    waiting    on    quota    %s', who, quota)
            self.__condition_variable.wait()
            got = self.acquire_all_or_none_unsafe(who, quota)
    return got
