HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/botocore/retries/__pycache__/quota.cpython-310.pyc
o

�h��@sdZddlZGdd�d�ZdS)zRetry quota implementation.�Nc@s:eZdZdZedfdd�Zdd�Zdd�Zed	d
��ZdS)�
RetryQuotai�NcCs&||_||_|durt��}||_dS�N)�
_max_capacity�_available_capacity�	threading�Lock�_lock)�self�initial_capacity�lock�r�I/usr/local/CyberCP/lib/python3.10/site-packages/botocore/retries/quota.py�__init__	s

zRetryQuota.__init__cCsX|j�||jkr	Wd�dS|j|8_	Wd�dS1s%wYdS)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_amountrrr
�acquires

�$�zRetryQuota.acquirecCs\|j|jkrdS|j�t|j|j|�}|j|7_Wd�dS1s'wYdS)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�amountrrr
�release s�"�zRetryQuota.releasecCs|jSr)r)r	rrr
�available_capacity4szRetryQuota.available_capacity)	�__name__�
__module__�__qualname__�INITIAL_CAPACITYrrr�propertyrrrrr
rsr)�__doc__rrrrrr
�<module>s