grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026§ »ºáä @ãóJ—dZddlZddlZddlmZddlmZmZddlm Z ddl m Z n #e $rdZ YnwxYwgd¢Z ddl mZn#e $rGd „d e¦«ZYnwxYwGd „d e¦«ZGd „d¦«ZGd„de¦«ZGd„de¦«ZGd„d¦«Ze €eZ dSdS)z'A multi-producer, multi-consumer queue.éN)Údeque)ÚheappushÚheappop)Ú monotonic)Ú SimpleQueue)ÚEmptyÚFullÚQueueÚ PriorityQueueÚ LifoQueuer)rcó—eZdZdZdS)rz4Exception raised by Queue.get(block=0)/get_nowait().N©Ú__name__Ú __module__Ú __qualname__Ú__doc__©óú,/opt/alt/python311/lib64/python3.11/queue.pyrrs€€€€€Ø>Ð>Ø ˆrrcó—eZdZdZdS)r z4Exception raised by Queue.put(block=0)/put_nowait().Nrrrrr r s€€€€€Ø:Ð:Ø€Drr cóŒ—eZdZdZdd„Zd„Zd„Zd„Zd„Zd„Z dd „Z dd „Z d „Z d„Z d„Zd„Zd„Zd„Zeej¦«Zd S)r zjCreate a queue object with a given maximum size. If maxsize is <= 0, the queue size is infinite. rcó0—||_| |¦«tj¦«|_tj|j¦«|_tj|j¦«|_tj|j¦«|_d|_ dS©Nr) ÚmaxsizeÚ_initÚ threadingÚLockÚmutexÚ ConditionÚ not_emptyÚnot_fullÚall_tasks_doneÚunfinished_tasks©Úselfrs rÚ__init__zQueue.__init__"s}€ØˆŒ Ø � Š �7ÑÔÐõ ”^Ñ%Ô%ˆŒ õ#Ô,¨T¬ZÑ8Ô8ˆŒõ"Ô+¨D¬JÑ7Ô7ˆŒ õ(Ô1°$´*Ñ=Ô=ˆÔØ !ˆÔÐÐrcóЗ|j5|jdz }|dkr.|dkrtd¦«‚|j ¦«||_ddd¦«dS#1swxYwYdS)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. érz!task_done() called too many timesN)r"r#Ú ValueErrorÚ notify_all)r%Ú unfinisheds rÚ task_donezQueue.task_done9s¼€ðÔ ð /ð /ØÔ.°Ñ2ˆJؘQŠˆØ ’>�>Ý$Ð%HÑIÔIÐIØÔ#×.Ò.Ñ0Ô0Ð0Ø$.ˆDÔ !ð  /ð /ð /ñ /ô /ð /ð /ð /ð /ð /ð /ð /øøøð /ð /ð /ð /ð /ð /sˆAAÁAÁ"Acó”—|j5|jr |j ¦«|j° ddd¦«dS#1swxYwYdS)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#Úwait©r%s rÚjoinz Queue.joinOsž€ðÔ ð +ð +ØÔ'ð +ØÔ#×(Ò(Ñ*Ô*Ð*ðÔ'ð +ð +ð +ð +ñ +ô +ð +ð +ð +ð +ð +ð +ð +øøøð +ð +ð +ð +ð +ð +sˆ(=½AÁAcól—|j5| ¦«cddd¦«S#1swxYwYdS)ú9Return the approximate size of the queue (not reliable!).N©rÚ_qsizer/s rÚqsizez Queue.qsize\sy€à ŒZð !ð !Ø—;’;‘=”=ð !ð !ð !ð !ñ !ô !ð !ð !ð !ð !ð !ð !øøøð !ð !ð !ð !ð !ð !s ˆ)©-°-cón—|j5| ¦« cddd¦«S#1swxYwYdS)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. Nr3r/s rÚemptyz Queue.emptyas~€ðŒZð %ð %Ø—{’{‘}”}Ð$ð %ð %ð %ð %ñ %ô %ð %ð %ð %ð %ð %ð %øøøð %ð %ð %ð %ð %ð %s ˆ*ª.±.có’—|j5d|jcxko| ¦«knccddd¦«S#1swxYwYdS)aOReturn 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. rN)rrr4r/s rÚfullz Queue.fullos™€ðŒZð 5ð 5Ø�t”|Ð4Ð4Ò4Ð4 t§{¢{¡}¤}Ò4Ð4Ð4Ð4ð 5ð 5ð 5ð 5ñ 5ô 5ð 5ð 5ð 5ð 5ð 5ð 5øøøð 5ð 5ð 5ð 5ð 5ð 5sˆ'<¼AÁATNcó—|j5|jdk�r|s%| ¦«|jkrt‚nî|€T| ¦«|jkr6|j ¦«| ¦«|jk°6n˜|dkrt d¦«‚t ¦«|z}| ¦«|jkrU|t ¦«z }|dkrt‚|j |¦«| ¦«|jk°U| |¦«|xjdz c_|j   ¦«ddd¦«dS#1swxYwYdS)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 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). rNú''timeout' must be a non-negative numberçr() r!rr4r r.r)ÚtimeÚ_putr#r Únotify)r%ÚitemÚblockÚtimeoutÚendtimeÚ remainings rÚputz Queue.putzs©€ðŒ]ð $ð $ØŒ|˜aÒÑØð6Ø—{’{‘}”}¨¬ Ò4Ð4Ý"˜ ð5à�_ØŸ+š+™-œ-¨4¬<Ò7Ð7Øœ ×*Ò*Ñ,Ô,Ð,ðŸ+š+™-œ-¨4¬<Ò7Ð7øà˜q’[�[Ý$Ð%NÑOÔOÐOå"™fœf wÑ.�GØŸ+š+™-œ-¨4¬<Ò7Ð7Ø$+­d©f¬fÑ$4˜ Ø$¨Ò+Ð+Ý"&˜JØœ ×*Ò*¨9Ñ5Ô5Ð5ð Ÿ+š+™-œ-¨4¬<Ò7Ð7ð �IŠI�d‰OŒOˆOØ Ð !Ô ! QÑ &Ð !Ô !Ø ŒN× !Ò !Ñ #Ô #Ð #ð' $ð $ð $ñ $ô $ð $ð $ð $ð $ð $ð $ð $øøøð $ð $ð $ð $ð $ð $sˆE E5Å5E9Å<E9cór—|j5|s| ¦«st‚nÊ|€B| ¦«s-|j ¦«| ¦«¯-n†|dkrt d¦«‚t ¦«|z}| ¦«sL|t ¦«z }|dkrt‚|j |¦«| ¦«¯L| ¦«}|j ¦«|cddd¦«S#1swxYwYdS)á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 non-negative 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;r<) r r4rr.r)r=Ú_getr!r?)r%rArBrCrDr@s rÚgetz Queue.getšsp€ðŒ^ð ð Øð 3Ø—{’{‘}”}ð Ý�Kð à�ØŸ+š+™-œ-ð*Ø”N×'Ò'Ñ)Ô)Ð)ðŸ+š+™-œ-ð*øà˜1’�Ý Ð!JÑKÔKÐKå™&œ& 7Ñ*�ØŸ+š+™-œ-ð3Ø '­$©&¬&Ñ 0�IØ  CÒ'Ð'Ý#˜ Ø”N×'Ò'¨ Ñ2Ô2Ð2ð Ÿ+š+™-œ-ð3ð —9’9‘;”;ˆDØ ŒM× Ò Ñ "Ô "Ð "Øð% ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð ð sˆDD,Ä,D0Ä3D0có0—| |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©rA©rE©r%r@s rÚ put_nowaitzQueue.put_nowait¹ó€ð �xŠx˜ EˆxÑ*Ô*Ð*rcó.—| d¬¦«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. FrK©rIr/s rÚ get_nowaitzQueue.get_nowaitÁó€ð �xŠx˜eˆxÑ$Ô$Ð$rcó,—t¦«|_dS©N)rÚqueuer$s rrz Queue._initÎs€Ý‘W”WˆŒ ˆ ˆ rcó*—t|j¦«SrV©ÚlenrWr/s rr4z Queue._qsizeÑó€Ý�4”:‰ŒÐrcó:—|j |¦«dSrV©rWÚappendrMs rr>z Queue._putÕó€Ø Œ ×Ò˜$ÑÔÐÐÐrcó4—|j ¦«SrV)rWÚpopleftr/s rrHz Queue._getÙs€ØŒz×!Ò!Ñ#Ô#Ð#r)r©TN)rrrrr&r,r0r5r7r9rErIrNrSrr4r>rHÚ classmethodÚtypesÚ GenericAliasÚ__class_getitem__rrrr r s€€€€€ððð "ð"ð"ð"ð./ð/ð/ð, +ð +ð +ð!ð!ð!ð %ð %ð %ð 5ð 5ð 5ð$ð$ð$ð$ð@ðððð>+ð+ð+ð%ð%ð%ððððððð ð ð ð$ð$ð$ð$˜  EÔ$6Ñ7Ô7ÐÐÐrr có*—eZdZdZd„Zd„Zd„Zd„ZdS)r zœVariant of Queue that retrieves open entries in priority order (lowest first). Entries are typically tuples of the form: (priority number, data). có—g|_dSrV©rWr$s rrzPriorityQueue._initåó €ØˆŒ ˆ ˆ rcó*—t|j¦«SrVrYr/s rr4zPriorityQueue._qsizeèr[rcó0—t|j|¦«dSrV)rrWrMs rr>zPriorityQueue._putës€Ý�”˜TÑ"Ô"Ð"Ð"Ð"rcó*—t|j¦«SrV)rrWr/s rrHzPriorityQueue._getîs€Ý�t”zÑ"Ô"Ð"rN©rrrrrr4r>rHrrrr r ßsZ€€€€€ððð ðððððð#ð#ð#ð#ð#ð#ð#ð#rr có*—eZdZdZd„Zd„Zd„Zd„ZdS)r zBVariant of Queue that retrieves most recently added entries first.có—g|_dSrVrir$s rrzLifoQueue._initõrjrcó*—t|j¦«SrVrYr/s rr4zLifoQueue._qsizeør[rcó:—|j |¦«dSrVr]rMs rr>zLifoQueue._putûr_rcó4—|j ¦«SrV)rWÚpopr/s rrHzLifoQueue._getþs€ØŒz�~Š~ÑÔÐrNrnrrrr r òsV€€€€€ØLÐLððððððð ð ð ð ð ð ð ð rr có`—eZdZdZd„Zd d„Zd d„Zd„Zd„Zd „Z d „Z e e j ¦«ZdS) Ú_PySimpleQueuezYSimple, unbounded FIFO queue. This pure Python implementation is not reentrant. có^—t¦«|_tjd¦«|_dSr)rÚ_queuerÚ SemaphoreÚ_countr/s rr&z_PySimpleQueue.__init__ s#€Ý‘g”gˆŒ ÝÔ)¨!Ñ,Ô,ˆŒ ˆ ˆ rTNcól—|j |¦«|j ¦«dS)zÆPut the item on the queue. The optional 'block' and 'timeout' arguments are ignored, as this method never blocks. They are provided for compatibility with the Queue class. N)rxr^rzÚrelease)r%r@rArBs rrEz_PySimpleQueue.puts4€ð Œ ×Ò˜4Ñ Ô Ð Ø Œ ×ÒÑÔÐÐÐrcó¦—|�|dkrtd¦«‚|j ||¦«st‚|j ¦«S)rGNrr;)r)rzÚacquirerrxra)r%rArBs rrIz_PySimpleQueue.getsT€ð Ð  7¨Q¢; ;ÝÐFÑGÔGÐ GØŒ{×"Ò" 5¨'Ñ2Ô2ð ݈KØŒ{×"Ò"Ñ$Ô$Ð$rcó0—| |d¬¦«S)zºPut an item into the queue without blocking. This is exactly equivalent to `put(item, block=False)` and is only provided for compatibility with the Queue class. FrKrLrMs rrNz_PySimpleQueue.put_nowait*rOrcó.—| d¬¦«SrQrRr/s rrSz_PySimpleQueue.get_nowait2rTrcó2—t|j¦«dkS)zCReturn True if the queue is empty, False otherwise (not reliable!).r©rZrxr/s rr7z_PySimpleQueue.empty:s€å�4”;ÑÔ 1Ò$Ð$rcó*—t|j¦«S)r2r‚r/s rr5z_PySimpleQueue.qsize>s€å�4”;ÑÔÐrrb)rrrrr&rErIrNrSr7r5rcrdrerfrrrrvrvs¢€€€€€ððð-ð-ð-ððððð%ð%ð%ð%ð"+ð+ð+ð%ð%ð%ð%ð%ð%ð ð ð ð$˜  EÔ$6Ñ7Ô7ÐÐÐrrv)rrrdÚ collectionsrÚheapqrrr=rrxrÚ ImportErrorÚ__all__rÚ Exceptionr r r r rvrrrúr‰s ðØ-Ð-àÐÐÐØ € € € ØÐÐÐÐÐØ#Ð#Ð#Ð#Ð#Ð#Ð#Ð#Ø"Ð"Ð"Ð"Ð"Ð"ðØ"Ð"Ð"Ð"Ð"Ð"Ð"øØðððØ€K€K€Kðøøøð RÐ QÐ Q€ð ØÐÐÐÐÐÐøØð ð ð ð ð ð ð ð � ñ ô ð ð ð ð øøøð  ð ð ð ð ˆ9ñ ô ð ð @8ð@8ð@8ð@8ð@8ñ@8ô@8ð@8ðF#ð#ð#ð#ð#�Eñ#ô#ð#ð&  ð  ð  ð  ð  �ñ  ô  ð  ð @8ð@8ð@8ð@8ð@8ñ@8ô@8ð@8ðFÐØ €K€K€KðÐs '§1°1¹AÁAÁA