$44 GRAYBYTE WORDPRESS FILE MANAGER $66

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.216.174
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/hc_python/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/

HOME
Current File : /opt/hc_python/lib/python3.12/site-packages/sqlalchemy/util/__pycache__//queue.cpython-312.pyc
�

M��g�'��h�dZddlmZddlZddlmZddlZddlmZddl	Z	ddl	m
Z
ddl	mZddl	mZdd	l	m
Z
dd
l	mZddl	mZdd
lmZddlmZddlmZede
��Zgd�ZGd�de�ZGd�de�ZGd�de
e�ZGd�dee�ZGd�dee�ZGd�dee�Zy)a�An adaptation of Py2.3/2.4's Queue module which supports reentrant
behavior, using RLock instead of Lock for its mutex object.  The
Queue object is used exclusively by the sqlalchemy.pool.QueuePool
class.

This is to support the connection pool's usage of weakref callbacks to return
connections to the underlying Queue, which can in extremely
rare cases be invoked within the ``get()`` method of the Queue itself,
producing a ``put()`` inside the ``get()`` and therefore a reentrant
condition.

�)�annotationsN)�deque)�time)�Any)�	Awaitable)�Deque)�Generic)�Optional)�TypeVar�)�await_fallback)�
await_only)�memoized_property�_T)�bound)�Empty�Full�Queuec��eZdZdZy)rz4Exception raised by Queue.get(block=0)/get_nowait().N��__name__�
__module__�__qualname__�__doc__���F/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/util/queue.pyrr,���:�rrc��eZdZdZy)rz4Exception raised by Queue.put(block=0)/put_nowait().Nrrrrrr2rrrc�x�eZdZUded<ded<ddd�Zdd�Zdd�Zdd�Zdd	�Z	d							dd�Z	dd�Z
ddd
�Zy
)�QueueCommon�int�maxsize�bool�use_lifoc��y�Nr��selfr#r%s   r�__init__zQueueCommon.__init__<s��#rc��t��r'��NotImplementedError�r)s r�emptyzQueueCommon.empty>���!�#�#rc��t��r'r,r.s r�fullzQueueCommon.fullAr0rc��t��r'r,r.s r�qsizezQueueCommon.qsizeDr0rc��t��r'r,�r)�items  r�
put_nowaitzQueueCommon.put_nowaitGr0rNc��t��r'r,)r)r7�block�timeouts    r�putzQueueCommon.putJs
��"�#�#rc��t��r'r,r.s r�
get_nowaitzQueueCommon.get_nowaitOr0rc��t��r'r,)r)r:r;s   r�getzQueueCommon.getRr0r�rF�r#r"r%r$��returnr$�rDr"�r7rrD�None�TN�r7rr:r$r;�Optional[float]rDrG�rDr�r:r$r;rJrDr)rrr�__annotations__r*r/r2r4r8r<r>r@rrrr!r!8sY��
�L��N�E�$�$�$�$�HL�$��$�#�$�5D�$�	
�$�
$�$rr!c��eZdZUded<ddd�Zdd�Zdd�Zdd�Z	d							dd�Zdd	�Z	ddd
�Z
dd�Zdd�Zdd
�Z
dd�Zdd�Zdd�Zdd�Zy)rz	Deque[_T]�queuec��|j|�tj�|_tj|j�|_tj|j�|_||_y)z�Initialize a queue object with a given maximum size.

        If `maxsize` is <= 0, the queue size is infinite.

        If `use_lifo` is True, this Queue acts like a Stack (LIFO).
        N)�_init�	threading�RLock�mutex�	Condition�	not_empty�not_fullr%r(s   rr*zQueue.__init__YsW��	
�
�
�7��
�_�_�&��
�#�,�,�T�Z�Z�8���"�+�+�D�J�J�7��
� ��
rc�f�|j5|j�cddd�S#1swYyxYw)z9Return the approximate size of the queue (not reliable!).N)rT�_qsizer.s rr4zQueue.qsizeps���Z�Z��;�;�=��Z�Z���'�0c�f�|j5|j�cddd�S#1swYyxYw)zKReturn True if the queue is empty, False otherwise (not
        reliable!).N)rT�_emptyr.s rr/zQueue.emptyvs���Z�Z��;�;�=��Z�Z�rZc�f�|j5|j�cddd�S#1swYyxYw)zJReturn True if the queue is full, False otherwise (not
        reliable!).N)rT�_fullr.s rr2z
Queue.full}s���Z�Z��:�:�<��Z�Z�rZNc�*�|j5|s|j�r�t�|�<|j�r�|jj�|j�r�+nq|dkrt	d��t�|z}|j�rD|t�z
}|dkrt�|jj|�|j�r�D|j
|�|jj�ddd�y#1swYyxYw)aPut an item into the queue.

        If optional args `block` is True and `timeout` is None (the
        default), block if necessary until a free slot is
        available. If `timeout` is a positive number, it blocks at
        most `timeout` seconds and raises the ``Full`` exception if no
        free slot was available within that time.  Otherwise (`block`
        is false), put an item on the queue if a free slot is
        immediately available, else raise the ``Full`` exception
        (`timeout` is ignored in that case).
        Nr�#'timeout' must be a positive number�)	rWr^r�wait�
ValueError�_time�_putrV�notify)r)r7r:r;�endtime�	remainings      rr<z	Queue.put�s����]�]���:�:�<��J����j�j�l��M�M�&�&�(��j�j�l��Q�;�$�%J�K�K��'�G�+���j�j�l� '�%�'� 1�I� �C�'�"�
��M�M�&�&�y�1�	�j�j�l�

�I�I�d�O��N�N�!�!�#�#�]�]�s�AD	�#A1D	�+D	�	Dc�&�|j|d�S)z�Put an item into the queue without blocking.

        Only enqueue the item if a free slot is immediately available.
        Otherwise raise the ``Full`` exception.
        F)r<r6s  rr8zQueue.put_nowait�s���x�x��e�$�$rc�,�|j5|s|j�r�t�|�<|j�r�|jj�|j�r�+nq|dkrt	d��t�|z}|j�rD|t�z
}|dkrt�|jj|�|j�r�D|j
�}|jj�|cddd�S#1swYyxYw)a
Remove and return an item from the queue.

        If optional args `block` is True and `timeout` is None (the
        default), block if necessary until an item is available. If
        `timeout` is a positive number, it blocks at most `timeout`
        seconds and raises the ``Empty`` exception if no item was
        available within that time.  Otherwise (`block` is false),
        return an item if one is immediately available, else raise the
        ``Empty`` exception (`timeout` is ignored in that case).

        Nrr`ra)	rVr\rrbrcrd�_getrWrf)r)r:r;rgrhr7s      rr@z	Queue.get�s����^�^���;�;�=��K����k�k�m��N�N�'�'�)��k�k�m��Q�;�$�%J�K�K��'�G�+���k�k�m� '�%�'� 1�I� �C�'�#���N�N�'�'�	�2�	�k�k�m�
�9�9�;�D��M�M� � �"��%�^�^�s�AD
�#A1D
�+D
�
Dc�$�|jd�S)z�Remove and return an item from the queue without blocking.

        Only get an item if one is immediately available. Otherwise
        raise the ``Empty`` exception.
        F)r@r.s rr>zQueue.get_nowait�s���x�x���rc�0�||_t�|_yr')r#rrO)r)r#s  rrQzQueue._init�s������W��
rc�,�t|j�Sr')�lenrOr.s rrYzQueue._qsize�s���4�:�:��rc��|jSr')rOr.s rr\zQueue._empty�s���:�:�~�rc�h�|jdkDxr"t|j�|jk(S)Nr)r#rorOr.s rr^zQueue._full�s'���|�|�a��C�C��
�
�O�t�|�|�$C�Crc�:�|jj|�yr')rO�appendr6s  rrez
Queue._put�s���
�
���$�rc��|jr|jj�S|jj�Sr')r%rO�pop�popleftr.s rrkz
Queue._get�s/���=�=��:�:�>�>�#�#��:�:�%�%�'�'rrArBrErCrHrIrFrLrK)r#r"rDrG)rrrrMr*r4r/r2r<r8r@r>rQrYr\r^rerkrrrrrVsx����!�.!�!� �HL� $�� $�#� $�5D� $�	
� $�D%��@����D� �(rrc��eZdZejr
edd��Znee�Zd
dd�Zdd�Z	d�Z
d�Zedd��Z
dd�Z	d							dd	�Zdd
�Zddd�Zy)�AsyncAdaptedQueuec��yr'r)�	coroutines r�await_zAsyncAdaptedQueue.await_�s��58rc� �||_||_yr')r%r#r(s   rr*zAsyncAdaptedQueue.__init__�s�� ��
���rc�6�|jj�Sr')�_queuer/r.s rr/zAsyncAdaptedQueue.empty�����{�{� � �"�"rc�6�|jj�Sr')r~r2r.s rr2zAsyncAdaptedQueue.fulls���{�{���!�!rc�6�|jj�Sr')r~r4r.s rr4zAsyncAdaptedQueue.qsizerrc��|jr"tj|j��}|Stj|j��}|S)N)r#)r%�asyncio�	LifoQueuer#r)r)rOs  rr~zAsyncAdaptedQueue._queues?���=�=��%�%�d�l�l�;�E����M�M�$�,�,�7�E��rc��	|jj|�y#tj$r}t	�|�d}~wwxYwr')r~r8r��	QueueFullr)r)r7�errs   rr8zAsyncAdaptedQueue.put_nowaits9��	"��K�K�"�"�4�(��� � �	"��&�c�!��	"�s��A�<�ANc�n�|s|j|�S	|�?|jtj|jj|�|��y|j|jj|��y#tjtjf$r}t�|�d}~wwxYwr')	r8r{r��wait_forr~r<r��TimeoutErrorr)r)r7r:r;r�s     rr<zAsyncAdaptedQueue.puts�����?�?�4�(�(�	"��"����G�,�,�T�[�[�_�_�T�-B�G�L�M����D�K�K�O�O�D�1�2���!�!�7�#7�#7�8�	"��&�c�!��	"�s�AB�*B�#B4�$B/�/B4c��	|jj�S#tj$r}t	�|�d}~wwxYwr')r~r>r��
QueueEmptyr)r)r�s  rr>zAsyncAdaptedQueue.get_nowait+s:��	#��;�;�)�)�+�+���!�!�	#��'�s�"��	#�s��?�:�?c�d�|s|j�S	|�=|jtj|jj�|��S|j|jj��S#tjtjf$r}t�|�d}~wwxYwr')	r>r{r�r�r~r@r�r�r)r)r:r;r�s    rr@zAsyncAdaptedQueue.get1s�����?�?�$�$�	#��"��{�{��$�$�T�[�[�_�_�%6��@����{�{�4�;�;�?�?�#4�5�5���"�"�G�$8�$8�9�	#��'�s�"��	#�s�>A<�(A<�<#B/�B*�*B/)rzzAwaitable[Any]rDrrArBrC)rDzasyncio.Queue[_T]rFrHrIrKrL)rrr�typing�
TYPE_CHECKING�staticmethodr{rr*r/r2r4rr~r8r<r>r@rrrrxrx�s���
���	�8�
�8��j�)���#�"�#����� "�HL�"��"�#�"�5D�"�	
�"�#�#rrxc�6�eZdZejs	ee�Zyy)�FallbackAsyncAdaptedQueueN)rrrr�r�r�r
r{rrrr�r�@s������n�-�� rr�)r�
__future__rr��collectionsrrRrrdr�rrrr	r
r�concurrencyr
r�langhelpersrr�__all__�	Exceptionrrr!rrxr�rrr�<module>r�s����#�����
�������'�#�*�
�T����
$��	�I�	�	�9�	�$�'�"�+�$�<W(�K��O�W(�tM#��B��M#�`.� 1�"� 5�.r


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2025 8.03 AM
root / root
0755
__init__.cpython-312.pyc
5.525 KB
4 Apr 2025 8.03 AM
root / root
0644
_collections.cpython-312.pyc
30.896 KB
4 Apr 2025 8.03 AM
root / root
0644
_concurrency_py3k.cpython-312.pyc
10.572 KB
4 Apr 2025 8.03 AM
root / root
0644
_has_cy.cpython-312.pyc
1.046 KB
4 Apr 2025 8.03 AM
root / root
0644
_py_collections.cpython-312.pyc
28.529 KB
4 Apr 2025 8.03 AM
root / root
0644
compat.cpython-312.pyc
12.148 KB
4 Apr 2025 8.03 AM
root / root
0644
concurrency.cpython-312.pyc
3.929 KB
4 Apr 2025 8.03 AM
root / root
0644
deprecations.cpython-312.pyc
13.305 KB
4 Apr 2025 8.03 AM
root / root
0644
langhelpers.cpython-312.pyc
82.695 KB
4 Apr 2025 8.03 AM
root / root
0644
preloaded.cpython-312.pyc
5.726 KB
4 Apr 2025 8.03 AM
root / root
0644
queue.cpython-312.pyc
14.21 KB
4 Apr 2025 8.03 AM
root / root
0644
tool_support.cpython-312.pyc
8.473 KB
4 Apr 2025 8.03 AM
root / root
0644
topological.cpython-312.pyc
3.798 KB
4 Apr 2025 8.03 AM
root / root
0644
typing.cpython-312.pyc
23.854 KB
4 Apr 2025 8.03 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF