Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python37/lib64/python3.7/asyncio/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python37/lib64/python3.7/asyncio/__pycache__/queues.cpython-37.pyc
B

� fC�@s~dZddlZddlZddlmZddlmZGdd�de�ZGdd	�d	e�ZGd
d�d�Z	Gdd
�d
e	�Z
Gdd�de	�ZdS))�Queue�
PriorityQueue�	LifoQueue�	QueueFull�
QueueEmpty�N�)�events)�locksc@seZdZdZdS)rz;Raised when Queue.get_nowait() is called on an empty Queue.N)�__name__�
__module__�__qualname__�__doc__�rr�3/opt/alt/python37/lib64/python3.7/asyncio/queues.pyr
src@seZdZdZdS)rzDRaised when the Queue.put_nowait() method is called on a full Queue.N)r
rrr
rrrrrsrc@s�eZdZdZd)dd�dd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Ze
dd��Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�ZdS)*raA queue, useful for coordinating producer and consumer coroutines.

    If maxsize is less than or equal to zero, the queue size is infinite. If it
    is an integer greater than 0, then "await put()" will block when the
    queue reaches maxsize, until an item is removed by get().

    Unlike the standard library Queue, you can reliably know this Queue's size
    with qsize(), since your single-threaded asyncio application won't be
    interrupted between calling qsize() and doing an operation on the Queue.
    rN)�loopcCsb|dkrt��|_n||_||_t��|_t��|_d|_t	j
|jd�|_|j��|�
|�dS)Nr)r)rZget_event_loop�_loop�_maxsize�collections�deque�_getters�_putters�_unfinished_tasksr	ZEvent�	_finished�set�_init)�self�maxsizerrrr�__init__ s


zQueue.__init__cCst��|_dS)N)rr�_queue)rrrrrr2szQueue._initcCs
|j��S)N)r�popleft)rrrr�_get5sz
Queue._getcCs|j�|�dS)N)r�append)r�itemrrr�_put8sz
Queue._putcCs*x$|r$|��}|��s|�d�PqWdS)N)rZdoneZ
set_result)r�waitersZwaiterrrr�_wakeup_next=s

zQueue._wakeup_nextcCs(dt|�j�dt|�d�d|���d�S)N�<z at z#x� �>)�typer
�id�_format)rrrr�__repr__EszQueue.__repr__cCsdt|�j�d|���d�S)Nr&r'r()r)r
r+)rrrr�__str__Hsz
Queue.__str__cCs~d|j��}t|dd�r,|dt|j���7}|jrH|dt|j��d�7}|jrd|dt|j��d�7}|jrz|d|j��7}|S)Nzmaxsize=rz _queue=z
 _getters[�]z
 _putters[z tasks=)r�getattr�listrr�lenrr)r�resultrrrr+Ksz
Queue._formatcCs
t|j�S)zNumber of items in the queue.)r1r)rrrr�qsizeWszQueue.qsizecCs|jS)z%Number of items allowed in the queue.)r)rrrrr[sz
Queue.maxsizecCs|jS)z3Return True if the queue is empty, False otherwise.)r)rrrr�empty`szQueue.emptycCs |jdkrdS|��|jkSdS)z�Return True if there are maxsize items in the queue.

        Note: if the Queue was initialized with maxsize=0 (the default),
        then full() is never True.
        rFN)rr3)rrrr�fullds
z
Queue.fullc�s�x�|��r�|j��}|j�|�y|IdHWq|��y|j�|�Wntk
rbYnX|��s�|��s�|�	|j��YqXqW|�
|�S)z�Put an item into the queue.

        Put an item into the queue. If the queue is full, wait until a free
        slot is available before adding item.
        N)r5r�
create_futurerr!�cancel�remove�
ValueError�	cancelledr%�
put_nowait)rr"Zputterrrr�putos

z	Queue.putcCs>|��rt�|�|�|jd7_|j��|�|j�dS)zyPut an item into the queue without blocking.

        If no free slot is immediately available, raise QueueFull.
        rN)r5rr#rr�clearr%r)rr"rrrr;�s

zQueue.put_nowaitc�s�x�|��r�|j��}|j�|�y|IdHWq|��y|j�|�Wntk
rbYnX|��s�|��s�|�	|j��YqXqW|�
�S)zoRemove and return an item from the queue.

        If queue is empty, wait until an item is available.
        N)r4rr6rr!r7r8r9r:r%�
get_nowait)r�getterrrr�get�s

z	Queue.getcCs$|��rt�|��}|�|j�|S)z�Remove and return an item from the queue.

        Return an item if one is immediately available, else raise QueueEmpty.
        )r4rr r%r)rr"rrrr>�s
zQueue.get_nowaitcCs8|jdkrtd��|jd8_|jdkr4|j��dS)a$Indicate that a formerly enqueued task is complete.

        Used by queue consumers. For each get() used to fetch a task,
        a subsequent call to task_done() tells the queue that the processing
        on the task is complete.

        If a join() is currently blocking, it will resume when all items have
        been processed (meaning that a task_done() call was received for every
        item that had been put() into the queue).

        Raises ValueError if called more times than there were items placed in
        the queue.
        rz!task_done() called too many timesrN)rr9rr)rrrr�	task_done�s


zQueue.task_donec�s|jdkr|j��IdHdS)aBlock until all items in the queue have been gotten and processed.

        The count of unfinished tasks goes up whenever an item is added to the
        queue. The count goes down whenever a consumer calls task_done() to
        indicate that the item was retrieved and all work on it is complete.
        When the count of unfinished tasks drops to zero, join() unblocks.
        rN)rr�wait)rrrr�join�s
z
Queue.join)r)r
rrr
rrr r#r%r,r-r+r3�propertyrr4r5r<r;r@r>rArCrrrrrs&
rc@s4eZdZdZdd�Zejfdd�Zejfdd�Z	dS)	rz�A subclass of Queue; retrieves entries in priority order (lowest first).

    Entries are typically tuples of the form: (priority number, data).
    cCs
g|_dS)N)r)rrrrrr�szPriorityQueue._initcCs||j|�dS)N)r)rr"�heappushrrrr#�szPriorityQueue._putcCs
||j�S)N)r)r�heappoprrrr �szPriorityQueue._getN)
r
rrr
r�heapqrEr#rFr rrrrr�src@s(eZdZdZdd�Zdd�Zdd�ZdS)	rzEA subclass of Queue that retrieves most recently added entries first.cCs
g|_dS)N)r)rrrrrr�szLifoQueue._initcCs|j�|�dS)N)rr!)rr"rrrr#�szLifoQueue._putcCs
|j��S)N)r�pop)rrrrr �szLifoQueue._getN)r
rrr
rr#r rrrrr�sr)�__all__rrG�rr	�	Exceptionrrrrrrrrr�<module>sH
Name
Size
Permissions
Options
__init__.cpython-37.opt-1.pyc
0.671 KB
-rw-r--r--
__init__.cpython-37.opt-2.pyc
0.616 KB
-rw-r--r--
__init__.cpython-37.pyc
0.671 KB
-rw-r--r--
base_events.cpython-37.opt-1.pyc
47.163 KB
-rw-r--r--
base_events.cpython-37.opt-2.pyc
38.447 KB
-rw-r--r--
base_events.cpython-37.pyc
47.384 KB
-rw-r--r--
base_futures.cpython-37.opt-1.pyc
2.05 KB
-rw-r--r--
base_futures.cpython-37.opt-2.pyc
1.714 KB
-rw-r--r--
base_futures.cpython-37.pyc
2.05 KB
-rw-r--r--
base_subprocess.cpython-37.opt-1.pyc
8.881 KB
-rw-r--r--
base_subprocess.cpython-37.opt-2.pyc
8.781 KB
-rw-r--r--
base_subprocess.cpython-37.pyc
8.973 KB
-rw-r--r--
base_tasks.cpython-37.opt-1.pyc
1.819 KB
-rw-r--r--
base_tasks.cpython-37.opt-2.pyc
1.819 KB
-rw-r--r--
base_tasks.cpython-37.pyc
1.819 KB
-rw-r--r--
constants.cpython-37.opt-1.pyc
0.574 KB
-rw-r--r--
constants.cpython-37.opt-2.pyc
0.574 KB
-rw-r--r--
constants.cpython-37.pyc
0.574 KB
-rw-r--r--
coroutines.cpython-37.opt-1.pyc
6.143 KB
-rw-r--r--
coroutines.cpython-37.opt-2.pyc
5.916 KB
-rw-r--r--
coroutines.cpython-37.pyc
6.226 KB
-rw-r--r--
events.cpython-37.opt-1.pyc
27.128 KB
-rw-r--r--
events.cpython-37.opt-2.pyc
18.081 KB
-rw-r--r--
events.cpython-37.pyc
27.233 KB
-rw-r--r--
format_helpers.cpython-37.opt-1.pyc
2.26 KB
-rw-r--r--
format_helpers.cpython-37.opt-2.pyc
2.021 KB
-rw-r--r--
format_helpers.cpython-37.pyc
2.26 KB
-rw-r--r--
futures.cpython-37.opt-1.pyc
10.39 KB
-rw-r--r--
futures.cpython-37.opt-2.pyc
7.152 KB
-rw-r--r--
futures.cpython-37.pyc
10.561 KB
-rw-r--r--
locks.cpython-37.opt-1.pyc
15.537 KB
-rw-r--r--
locks.cpython-37.opt-2.pyc
9.08 KB
-rw-r--r--
locks.cpython-37.pyc
15.537 KB
-rw-r--r--
log.cpython-37.opt-1.pyc
0.231 KB
-rw-r--r--
log.cpython-37.opt-2.pyc
0.193 KB
-rw-r--r--
log.cpython-37.pyc
0.231 KB
-rw-r--r--
proactor_events.cpython-37.opt-1.pyc
19.409 KB
-rw-r--r--
proactor_events.cpython-37.opt-2.pyc
19.019 KB
-rw-r--r--
proactor_events.cpython-37.pyc
19.614 KB
-rw-r--r--
protocols.cpython-37.opt-1.pyc
8.521 KB
-rw-r--r--
protocols.cpython-37.opt-2.pyc
3.118 KB
-rw-r--r--
protocols.cpython-37.pyc
8.521 KB
-rw-r--r--
queues.cpython-37.opt-1.pyc
7.979 KB
-rw-r--r--
queues.cpython-37.opt-2.pyc
5.346 KB
-rw-r--r--
queues.cpython-37.pyc
7.979 KB
-rw-r--r--
runners.cpython-37.opt-1.pyc
1.894 KB
-rw-r--r--
runners.cpython-37.opt-2.pyc
1.228 KB
-rw-r--r--
runners.cpython-37.pyc
1.894 KB
-rw-r--r--
selector_events.cpython-37.opt-1.pyc
27.724 KB
-rw-r--r--
selector_events.cpython-37.opt-2.pyc
26.114 KB
-rw-r--r--
selector_events.cpython-37.pyc
27.784 KB
-rw-r--r--
sslproto.cpython-37.opt-1.pyc
20.564 KB
-rw-r--r--
sslproto.cpython-37.opt-2.pyc
13.895 KB
-rw-r--r--
sslproto.cpython-37.pyc
20.758 KB
-rw-r--r--
streams.cpython-37.opt-1.pyc
19.541 KB
-rw-r--r--
streams.cpython-37.opt-2.pyc
13.449 KB
-rw-r--r--
streams.cpython-37.pyc
19.81 KB
-rw-r--r--
subprocess.cpython-37.opt-1.pyc
6.562 KB
-rw-r--r--
subprocess.cpython-37.opt-2.pyc
6.435 KB
-rw-r--r--
subprocess.cpython-37.pyc
6.591 KB
-rw-r--r--
tasks.cpython-37.opt-1.pyc
21.738 KB
-rw-r--r--
tasks.cpython-37.opt-2.pyc
14.681 KB
-rw-r--r--
tasks.cpython-37.pyc
21.793 KB
-rw-r--r--
transports.cpython-37.opt-1.pyc
11.893 KB
-rw-r--r--
transports.cpython-37.opt-2.pyc
6.364 KB
-rw-r--r--
transports.cpython-37.pyc
11.922 KB
-rw-r--r--
unix_events.cpython-37.opt-1.pyc
31.249 KB
-rw-r--r--
unix_events.cpython-37.opt-2.pyc
27.637 KB
-rw-r--r--
unix_events.cpython-37.pyc
31.586 KB
-rw-r--r--
windows_events.cpython-37.opt-1.pyc
22.524 KB
-rw-r--r--
windows_events.cpython-37.opt-2.pyc
21.44 KB
-rw-r--r--
windows_events.cpython-37.pyc
22.524 KB
-rw-r--r--
windows_utils.cpython-37.opt-1.pyc
4.213 KB
-rw-r--r--
windows_utils.cpython-37.opt-2.pyc
3.789 KB
-rw-r--r--
windows_utils.cpython-37.pyc
4.295 KB
-rw-r--r--