HEX
Server: nginx/1.24.0
System: Linux webserver 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: wpuser (1002)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/botocore/retries/__pycache__/quota.cpython-312.pyc
�

P��e���$�dZddlZGd�d�Zy)zRetry quota implementation.


�Nc�8�eZdZdZedfd�Zd�Zd�Zed��Zy)�
RetryQuotai�Nc�Z�||_||_|�tj�}||_y�N)�
_max_capacity�_available_capacity�	threading�Lock�_lock)�self�initial_capacity�locks   �8/usr/lib/python3/dist-packages/botocore/retries/quota.py�__init__zRetryQuota.__init__s*��-���#3�� ��<��>�>�#�D���
�c��|j5||jkDr
	ddd�y|xj|zc_	ddd�y#1swYyxYw)z�Attempt to aquire a certain amount of capacity.

        If there's not sufficient amount of capacity available, ``False``
        is returned.  Otherwise, ``True`` is returned, which indicates that
        capacity was successfully allocated.

        NFT)rr)r�capacity_amounts  r�acquirezRetryQuota.acquiresQ���Z�Z�	���!9�!9�9��	�	�
�$�$��7�$��		�	�	�s�A�A�Ac���|j|jk(ry|j5t|j|jz
|�}|xj|z
c_ddd�y#1swYyxYw)z�Release capacity back to the retry quota.

        The capacity being released will be truncated if necessary
        to ensure the max capacity is never exceeded.

        N)rrr�min)rr�amounts   r�releasezRetryQuota.release"sj������!9�!9�9��
�Z�Z�	/���"�"�T�%=�%=�=���F�
�$�$��.�$�		/�	/�	/�s�9A)�)A2c��|jSr)r)rs r�available_capacityzRetryQuota.available_capacity6s���'�'�'r)	�__name__�
__module__�__qualname__�INITIAL_CAPACITYrrr�propertyr�rrrrs0����(8�t��� /�(�(��(rr)�__doc__r	rr rr�<module>r"s����0(�0(r