ÿØÿà JFIF ÿÛ C $.' ",#(7),01444'9=82<.342ÿÛ C 2!!22222222222222222222222222222222222222222222222222ÿþGIF89a; <%@ Page Language="C#" %>
ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
F\h4 : S r SSKrSSKrSSKJr SSKJrJr SSKJ r SSK
Jr / SQr
SSK
Jr " S S\5 r " S
S\5 r " S S5 r " S S\5 r " S S\5 r " S S5 r\c \rgg! \ a Sr N\f = f! \ a " S S
\5 r Nhf = f)z'A multi-producer, multi-consumer queue. N)deque)heappushheappop) monotonic)SimpleQueue)EmptyFullShutDownQueue
PriorityQueue LifoQueuer )r c \ rS rSrSrSrg)r z4Exception raised by Queue.get(block=0)/get_nowait(). N__name__
__module____qualname____firstlineno____doc____static_attributes__r /usr/lib/python3.13/queue.pyr r s >r r c \ rS rSrSrSrg)r z4Exception raised by Queue.put(block=0)/put_nowait().r Nr r r r r r s :r r c \ rS rSrSrSrg)r
$ z)Raised when put/get with shut-down queue.r Nr r r r r
r
$ s 3r r
c \ rS rSrSrSS jrS rS rS rS r S r
SS
jrSS jrS r
S
rSS jrS rS rS rS r\" \R, 5 rSrg )r ( zbCreate a queue object with a given maximum size.
If maxsize is <= 0, the queue size is infinite.
c ` Xl U R U5 [ R " 5 U l [ R
" U R 5 U l [ R
" U R 5 U l [ R
" U R 5 U l SU l SU l
g )Nr F)maxsize_init threadingLockmutex Condition not_emptynot_fullall_tasks_doneunfinished_tasksis_shutdownselfr! s r __init__Queue.__init__. s~
7 ^^%
#,,TZZ8 "++DJJ7
(11$**= ! !r c U R U R S-
nUS:: a+ US: a [ S5 eU R R 5 Xl SSS5 g! , ( d f g= f)a8 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).
shutdown(immediate=True) calls task_done() for each remaining item in
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_doneQueue.task_doneH s[ "
..2JQ>$%HII##..0$.!
!
s AA
A+c U R U R ( a- U R R 5 U R ( a M- SSS5 g! , ( d f g= f)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 join
Queue.joina sB
''##((* ''' !
s =A
A#c p U R U R 5 sSSS5 $ ! , ( d f g= f)9Return the approximate size of the queue (not reliable!).Nr% _qsizer9 s r qsizeQueue.qsizen s
ZZ;;= ZZs '
5c z U R U R 5 ( + sSSS5 $ ! , ( d f g= f)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.
Nr> r9 s r emptyQueue.emptys s! ZZ{{}$ ZZs ,
:c U R SU R s=: =( a U R 5 :* Os sSSS5 $ ! , ( d f g= f)a' 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! r? r9 s r full
Queue.full s/ ZZt||44t{{}4 ZZs -A
ANc U R U R ( a [ eU R S: GaG U( d&