§
    ®eîi�  ã                   óD   — d Z ddlZddlmZ  G d„ dej        ¦  «        ZdS )aD  This 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)ÚLiteralc                   óv   ‡ — e Zd ZdZdZddeddfˆ fd„Zedefd„¦   «         Zde	d	         fˆ fd
„Z
dˆ fd„Zˆ xZS )ÚTrackedBoundedSemaphorezÙSimple 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_valueé   ÚvalueÚreturnNc                 óX   •— t          ¦   «                              |¦  «         || _        d S ©N)ÚsuperÚ__init__r   )Úselfr	   Ú	__class__s     €ú_/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/ext/_utils/asyncio.pyr   z TrackedBoundedSemaphore.__init__)   s)   ø€ Ý‰Œ×Ò˜ÑÔÐØ#ˆÔÐÐó    c                 ó   — | j         S r   r   )r   s    r   Úcurrent_valuez%TrackedBoundedSemaphore.current_value-   s   € àÔ"Ð"r   Tc              ƒ   óx   •K  — t          ¦   «                              ¦   «         ƒ d {V —† | xj        dz  c_        dS )Nr   T)r   Úacquirer   ©r   r   s    €r   r   zTrackedBoundedSemaphore.acquire1   sF   øè è € Ý‰gŒg�oŠoÑÔÐÐÐÐÐÐÐØÐÔ˜qÑ ÐÔØˆtr   c                 óh   •— t          ¦   «                              ¦   «          | xj        dz  c_        d S )Nr   )r   Úreleaser   r   s    €r   r   zTrackedBoundedSemaphore.release6   s1   ø€ Ý‰Œ�ŠÑÔÐØÐÔ˜qÑ ÐÔÐÐr   )r   )r
   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úintr   Úpropertyr   r   r   r   Ú__classcell__)r   s   @r   r   r   !   sÏ   ø€ € € € € ðð ð
 $€Ið$ð $˜cð $¨$ð $ð $ð $ð $ð $ð $ð ð#˜sð #ð #ð #ñ „Xð#ð˜w tœ}ð ð ð ð ð ð ð
!ð !ð !ð !ð !ð !ð !ð !ð !ð !r   r   )r   ÚasyncioÚtypingr   ÚBoundedSemaphorer   © r   r   ú<module>r&      sc   ðð&ð ð €€€Ø Ð Ð Ð Ð Ð ð!ð !ð !ð !ð !˜gÔ6ñ !ô !ð !ð !ð !r   