grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jè,ã@sþ ddlZddlZddlmZddlmZmZddlmZzddl m Z Wn e y0dZ Ynwgd¢Z zddl m Z Wne yNGdd „d eƒZ YnwGd d „d eƒZGd d „d ƒZGdd„deƒZGdd„deƒZGdd„dƒZe dur}eZ dSdS)éN)Údeque)ÚheappushÚheappop)Ú monotonic)Ú SimpleQueue)ÚEmptyÚFullÚQueueÚ PriorityQueueÚ LifoQueuer)rc@óeZdZ dS)rN©Ú__name__Ú __module__Ú __qualname__©rrú,/opt/alt/python310/lib64/python3.10/queue.pyrórc@r )rNr rrrrrrrc@sŽeZdZ d dd„Zdd„Zdd„Zdd „Zd d „Zd d „Zd!dd„Z d!dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„ZeejƒZdS)"r rcCsN||_| |¡t ¡|_t |j¡|_t |j¡|_t |j¡|_d|_ dS©Nr) ÚmaxsizeÚ_initÚ threadingZLockÚmutexZ ConditionÚ not_emptyÚnot_fullÚall_tasks_doneÚunfinished_tasks©ÚselfrrrrÚ__init__"s   zQueue.__init__cCs` |j�"|jd}|dkr|dkrtdƒ‚|j ¡||_WdƒdS1s)wYdS)Nérz!task_done() called too many times)rrÚ ValueErrorZ notify_all)rZ unfinishedrrrÚ task_done9s  "úzQueue.task_donecCsT |j�|jr|j ¡|jsWdƒdSWdƒdS1s#wYdS©N)rrÚwait©rrrrÚjoinOs ÿÿ"ÿz Queue.joincCs4 |j� | ¡WdƒS1swYdSr#©rÚ_qsizer%rrrÚqsize\s$ÿz Queue.qsizecCs6 |j� | ¡ WdƒS1swYdSr#r'r%rrrÚemptyas $ÿz Queue.emptycCsJ |j�d|jko| ¡knWdƒS1swYdSr)rrr(r%rrrÚfullos$ÿz Queue.fullTNcCsú |j�o|jdkrZ|s| ¡|jkrt‚nD|dur.| ¡|jkr-|j ¡| ¡|jks!n,|dkr6tdƒ‚tƒ|}| ¡|jkrZ|tƒ}|dkrMt‚|j |¡| ¡|jksB| |¡|jd7_|j   ¡WdƒdS1svwYdS)Nrú''timeout' must be a non-negative numberçr ) rrr(rr$r!ÚtimeÚ_putrrÚnotify)rÚitemÚblockÚtimeoutÚendtimeÚ remainingrrrÚputzs2 ÿ ÿ€   ü  "íz Queue.putcCsÄ |j�T|s| ¡s t‚n8|dur | ¡s|j ¡| ¡rn&|dkr(tdƒ‚tƒ|}| ¡sF|tƒ}|dkrz_PySimpleQueue.put_nowaitcCr?r:r@r%rrrrA2rBz_PySimpleQueue.get_nowaitcCs t|jƒdkSr©rFrYr%rrrr*:sz_PySimpleQueue.emptycCs t|jƒSr#r]r%rrrr)>s z_PySimpleQueue.qsizerN)rrrrr6r8r=rAr*r)rOrPrQrRrrrrrXs  rX)rrPÚ collectionsrÚheapqrrr.rrYrÚ ImportErrorÚ__all__rÚ Exceptionrr r r rXrrrrÚs4   ÿ ÿDCÿ