⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.12
/
__pycache__
/
View File Name :
queue.cpython-312.pyc
CRh, d Z ddlZddlZddlmZ ddlmZmZ ddlm Z ddl mZ g dZ ddl mZ G d de Z G d d Z G d de Z G d de Z G d d ZeeZyy# e$ r dZY Ow xY w# e$ r G d d e ZY Zw xY w)z'A multi-producer, multi-consumer queue. N)deque)heappushheappop) monotonic)SimpleQueue)EmptyFullQueue PriorityQueue LifoQueuer )r c e Zd ZdZy)r z4Exception raised by Queue.get(block=0)/get_nowait().N__name__ __module____qualname____doc__ /usr/lib/python3.12/queue.pyr r s >r r c e Zd ZdZy)r z4Exception raised by Queue.put(block=0)/put_nowait().Nr r r r r r s :r r c e Zd ZdZddZd Zd Zd Zd Zd Z dd Z dd Zd Zd Z d Zd Zd Zd Z eej( Zy)r zjCreate a queue object with a given maximum size. If maxsize is <= 0, the queue size is infinite. c L || _ | j | t j | _ t j | j | _ t j | j | _ t j | j | _ d| _ y Nr ) maxsize_init threadingLockmutex Condition not_emptynot_fullall_tasks_doneunfinished_tasksselfr s r __init__zQueue.__init__" sv 7 ^^% #,,TZZ8 "++DJJ7 (11$**= !r c | j 5 | j dz }|dk r*|dk rt d | j j || _ ddd y# 1 sw Y yxY w)a. Indicate that a formerly enqueued task is complete. Used by Queue consumer threads. 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 a ValueError if called more times than there were items placed in the queue. r z!task_done() called too many timesN)r" r# ValueError notify_all)r% unfinisheds r task_donezQueue.task_done9 s] ..2JQ>$%HII##..0$.D! ! s AAA%c | j 5 | j r'| j j | j r'ddd y# 1 sw Y yxY w)a Blocks 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 thread calls task_done() to indicate the item was retrieved and all work on it is complete. When the count of unfinished tasks drops to zero, join() unblocks. N)r" r# waitr% s r joinz Queue.joinO s? ''##((* '' ! s 3A Ac f | j 5 | j cddd S # 1 sw Y yxY w)9Return the approximate size of the queue (not reliable!).Nr _qsizer/ s r qsizezQueue.qsize\ s ZZ;;= ZZs '0c h | j 5 | j cddd S # 1 sw Y yxY w)a Return True if the queue is empty, False otherwise (not reliable!). This method is likely to be removed at some point. Use qsize() == 0 as a direct substitute, but be aware that either approach risks a race condition where a queue can grow before the result of empty() or qsize() can be used. To create code that needs to wait for all queued tasks to be completed, the preferred technique is to use the join() method. Nr3 r/ s r emptyzQueue.emptya s! ZZ{{}$ ZZs (1c | j 5 d| j cxk xr | j k nc cddd S # 1 sw Y yxY w)aO Return True if the queue is full, False otherwise (not reliable!). This method is likely to be removed at some point. Use qsize() >= n as a direct substitute, but be aware that either approach risks a race condition where a queue can shrink before the result of full() or qsize() can be used. r N)r r r4 r/ s r fullz Queue.fullo s, ZZt||4t{{}4 ZZs (?ANc | j 5 | j dkD r|s#| j | j k\ rt |V| j | j k\ r| j j | j | j k\ r8n|dk rt d t |z }| j | j k\ rQ|t z }|dk rt | j j | | j | j k\ rQ| j | | xj dz c_ | j j ddd y# 1 sw Y yxY w)a Put 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 non-negative 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). r N''timeout' must be a non-negative number r( )r! r r4 r r. r) time_putr# r notify)r% itemblocktimeoutendtime remainings r putz Queue.putz s ]]||a{{}4" _++-4<<7 **, ++-4<<7q[$%NOO"fw.G++-4<<7$+df$4 $+"&J **95 ++-4<<7 IIdO!!Q&!NN!!#' ]]s BE/BE/&A