Helper coroutine to increment the usage counter while holding the lock. Returns the new value of the usage counter.
(self)
| 701 | raise |
| 702 | |
| 703 | async def _increment_usage(self) -> int: |
| 704 | """ |
| 705 | Helper coroutine to increment the usage counter while holding the lock. |
| 706 | Returns the new value of the usage counter. |
| 707 | """ |
| 708 | async with self._usage_lock: |
| 709 | self._usage_counter += 1 |
| 710 | return self._usage_counter |
| 711 | |
| 712 | async def _decrement_usage(self) -> int: |
| 713 | """ |