MCPcopy
hub / github.com/redis/redis-py / _decrement_usage

Method _decrement_usage

redis/asyncio/client.py:712–719  ·  view source on GitHub ↗

Helper coroutine to decrement the usage counter while holding the lock. Returns the new value of the usage counter.

(self)

Source from the content-addressed store, hash-verified

710 return self._usage_counter
711
712 async def _decrement_usage(self) -> int:
713 """
714 Helper coroutine to decrement the usage counter while holding the lock.
715 Returns the new value of the usage counter.
716 """
717 async with self._usage_lock:
718 self._usage_counter -= 1
719 return self._usage_counter
720
721 async def __aexit__(self, exc_type, exc_value, traceback):
722 """

Callers 2

__aenter__Method · 0.95
__aexit__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected