L iFdZddlZddlmZGddejZy)aDThis module contains helper functions related to the std-lib asyncio module. .. versionadded:: 21.11 Warning: Contents of this module are intended to be used internally by the library and *not* by the user. Changes to this module are not considered breaking changes and may not be documented in the changelog. N)LiteralcjeZdZdZdZd deddffd ZedefdZde dffd Z d fd Z xZ S) TrackedBoundedSemaphorezSimple subclass of :class:`asyncio.BoundedSemaphore` that tracks the current value of the semaphore. While there is an attribute ``_value`` in the superclass, it's private and we don't want to rely on it. _current_valuevaluereturnNc2t||||_yN)super__init__r)selfr __class__s a/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/ext/_utils/asyncio.pyr z TrackedBoundedSemaphore.__init__)s #c|jSr r)rs r current_valuez%TrackedBoundedSemaphore.current_value-s"""rTchKt|d{|xjdzc_y7w)NT)r acquirerrrs rrzTrackedBoundedSemaphore.acquire1s0go q  s 202cLt||xjdz c_y)Nr)r releaserrs rrzTrackedBoundedSemaphore.release6s  q r)r)r N) __name__ __module__ __qualname____doc__ __slots__intr propertyrrrr __classcell__)rs@rrr!sW $I$c$$$#s##wt} !!rr)rasynciotypingrBoundedSemaphorerrrr&s$&!g66!r