• File: queue.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/__pycache__/queue.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 6.23 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~d_,@sddlZddlmZddlmZmZddlmZyddlm	Z	Wne
k
rXdZ	YnXdddd	d
dgZyddlmZWn$e
k
rGd
ddeZYnXGdddeZGdddZGdd	d	eZGdd
d
eZGdddZe	dkreZ	dS)N)deque)heappushheappop)	monotonic)SimpleQueueEmptyFullQueue
PriorityQueue	LifoQueuer)rc@seZdZdS)rN)__name__
__module____qualname__rr*/opt/alt/python37/lib64/python3.7/queue.pyrsc@seZdZdS)rN)rr
rrrrrrsc@seZdZd ddZddZddZdd	Zd
dZdd
Zd!ddZ	d"ddZ
ddZddZddZ
ddZddZddZdS)#r	rcCsN||_||t|_t|j|_t|j|_t|j|_d|_	dS)Nr)
maxsize_init	threadingZLockmutexZ	Condition	not_emptynot_fullall_tasks_doneunfinished_tasks)selfrrrr__init__!s

zQueue.__init__c	CsH|j8|jd}|dkr4|dkr*td|j||_WdQRXdS)Nrz!task_done() called too many times)rr
ValueErrorZ
notify_all)rZ
unfinishedrrr	task_done8s

zQueue.task_donec	Cs,|jx|jr|jq
WWdQRXdS)N)rrwait)rrrrjoinNs	z
Queue.joinc	Cs|j
|SQRXdS)N)r_qsize)rrrrqsize[szQueue.qsizec	Cs|j|SQRXdS)N)rr )rrrrempty`szQueue.emptyc	Cs0|j d|jko |kSSQRXdS)Nr)rrr )rrrrfullnsz
Queue.fullTNc	Cs|j|jdkr|s*||jkrtnz|dkrRxp||jkrN|jq4WnR|dkrdtdn@t|}x4||jkr|t}|dkrt|j|qpW|||jd7_|j	
WdQRXdS)Nrz''timeout' must be a non-negative numbergr)rrr rrrtime_putrrnotify)ritemblocktimeoutendtime	remainingrrrputys&




z	Queue.putc	Cs|j|s|stnn|dkr<xd|s8|jq$WnL|dkrNtdn:t|}x.|s|t}|dkrxt|j|qZW|}|j|SQRXdS)Nrz''timeout' must be a non-negative numberg)	rr rrrr$_getrr&)rr(r)r*r+r'rrrgets$





z	Queue.getcCs|j|ddS)NF)r()r,)rr'rrr
put_nowaitszQueue.put_nowaitcCs|jddS)NF)r()r.)rrrr
get_nowaitszQueue.get_nowaitcCst|_dS)N)rqueue)rrrrrrszQueue._initcCs
t|jS)N)lenr1)rrrrr szQueue._qsizecCs|j|dS)N)r1append)rr'rrrr%sz
Queue._putcCs
|jS)N)r1popleft)rrrrr-sz
Queue._get)r)TN)TN)rr
rrrrr!r"r#r,r.r/r0rr r%r-rrrrr	s


 

c@s,eZdZddZddZddZddZd	S)
r
cCs
g|_dS)N)r1)rrrrrrszPriorityQueue._initcCs
t|jS)N)r2r1)rrrrr szPriorityQueue._qsizecCst|j|dS)N)rr1)rr'rrrr%szPriorityQueue._putcCs
t|jS)N)rr1)rrrrr-szPriorityQueue._getN)rr
rrr r%r-rrrrr
sc@s,eZdZddZddZddZddZd	S)
rcCs
g|_dS)N)r1)rrrrrrszLifoQueue._initcCs
t|jS)N)r2r1)rrrrr szLifoQueue._qsizecCs|j|dS)N)r1r3)rr'rrrr%szLifoQueue._putcCs
|jS)N)r1pop)rrrrr-szLifoQueue._getN)rr
rrr r%r-rrrrrsc@sHeZdZddZdddZdddZd	d
ZddZd
dZddZ	dS)_PySimpleQueuecCst|_td|_dS)Nr)r_queuerZ	Semaphore_count)rrrrr	sz_PySimpleQueue.__init__TNcCs|j||jdS)N)r7r3r8release)rr'r(r)rrrr,
sz_PySimpleQueue.putcCs4|dk	r|dkrtd|j||s*t|jS)Nrz''timeout' must be a non-negative number)rr8acquirerr7r4)rr(r)rrrr.s
z_PySimpleQueue.getcCs|j|ddS)NF)r()r,)rr'rrrr/'sz_PySimpleQueue.put_nowaitcCs|jddS)NF)r()r.)rrrrr0/sz_PySimpleQueue.get_nowaitcCst|jdkS)Nr)r2r7)rrrrr"7sz_PySimpleQueue.emptycCs
t|jS)N)r2r7)rrrrr!;sz_PySimpleQueue.qsize)TN)TN)
rr
rrr,r.r/r0r"r!rrrrr6s

	
r6)rcollectionsrheapqrrr$rr7rImportError__all__rAttributeError	Exceptionrr	r
rr6rrrr<module>s(
BA