File "queues.cpython-39.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__/queues.cpython-39.pyc
File size: 9.95 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

a

XC?h.@sgdZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlZddl
mZddl
mZejjZddlmZmZmZmZmZGdd	d	eZeZGd
ddeZGdd
d
eZdS))QueueSimpleQueue
JoinableQueueN)EmptyFull)
connection)context)debuginfoFinalizeregister_after_fork
is_exitingc@seZdZd-ddZddZddZdd	Zd.ddZd/ddZd0ddZ	ddZ
ddZddZddZ
ddZddZdd Zd!d"Zd#d$Zed%d&Zed'd(Zed)d*Zed+d,ZdS)1rrcCs|dkrddlm}||_tjdd\|_|_||_t	
|_tj
dkrTd|_n
||_|||_d|_|tj
dkrt|tjdS)Nrr)
SEM_VALUE_MAXFZduplexwin32)Zsynchronizer_maxsizerPipe_reader_writerLock_rlockosgetpid_opidsysplatform_wlockZBoundedSemaphore_sem
_ignore_epipe_resetr
r_after_forkselfmaxsizectxr&;/opt/alt/python39/lib64/python3.9/multiprocessing/queues.py__init__%s




zQueue.__init__cCs.t||j|j|j|j|j|j|j|j	fSN)
r	assert_spawningrrrrrrrrr#r&r&r'__getstate__9s
zQueue.__getstate__c	Cs0|\|_|_|_|_|_|_|_|_|dSr))	rrrrrrrrr r#stater&r&r'__setstate__>szQueue.__setstate__cCstd|jdddS)NzQueue._after_fork()T)
after_fork)r
r r+r&r&r'r!CszQueue._after_forkFcCsj|r|jntt|_t|_d|_d|_	d|_
d|_d|_|j
j|_|jj|_|jj|_dSNF)	_notempty_at_fork_reinit	threading	Conditionrcollectionsdeque_buffer_thread_jointhread_joincancelled_closed_closer
send_bytes_send_bytesr
recv_bytes_recv_bytespoll_poll)r#r0r&r&r'r Gs


zQueue._resetTNcCsz|jrtd|d|j||s(t|j8|jdurB||j	||j
Wdn1sl0YdSNzQueue z
 is closed)r<
ValueErrorracquirerr2r9
_start_threadr8appendnotifyr#objblocktimeoutr&r&r'putVs
z	Queue.putcCs|jrtd|d|r\|dur\|j|}Wdn1sF0Y|jn||rlt|}|j||s~t	zL|r|t}|
|st	n|
st	|}|jW|jn|j0t|SrD)
r<rErrArreleasetime	monotonicrFrrC_ForkingPicklerloads)r#rLrMresZdeadliner&r&r'getbs*&
z	Queue.getcCs|j|jjSr))rr_semlockZ
_get_valuer+r&r&r'qsize|szQueue.qsizecCs
|Sr)rCr+r&r&r'emptyszQueue.emptycCs|jjSr))rrV_is_zeror+r&r&r'fullsz
Queue.fullcCs
|dSr1)rUr+r&r&r'
get_nowaitszQueue.get_nowaitcCs||dSr1)rNr#rKr&r&r'
put_nowaitszQueue.put_nowaitcCs d|_|j}|rd|_|dS)NT)r<r=)r#closer&r&r'r_s
zQueue.closecCs.td|jsJd||jr*|dS)NzQueue.join_thread()zQueue {0!r} not closed)r
r<formatr:r+r&r&r'join_threadszQueue.join_threadcCs4tdd|_z|jWnty.Yn0dS)NzQueue.cancel_join_thread()T)r
r;r:ZcancelAttributeErrorr+r&r&r'cancel_join_threadszQueue.cancel_join_threadcCstd|jtjtj|j|j|j|j	|j
j|jj|j
|j|jf	dd|_d|j_td|jtd|jst|jtjt|jgdd|_t|tj|j|jgd	d|_dS)
NzQueue._start_thread()ZQueueFeederThread)targetargsnameTzdoing self._thread.start()z... done self._thread.start())Zexitpriority
)r
r8clearr4ZThreadr_feedr2r?rrr_rr_on_queue_feeder_errorrr9Zdaemonstartr;r_finalize_joinweakrefrefr:_finalize_closer=r+r&r&r'rGs4


zQueue._start_threadcCs4td|}|dur(|tdntddS)Nzjoining queue threadz... queue thread joinedz... queue thread already dead)r
join)Ztwrthreadr&r&r'rms
zQueue._finalize_joincCsBtd|"|t|Wdn1s40YdS)Nztelling queue thread to quit)r
rH	_sentinelrI)buffernotemptyr&r&r'rps
zQueue._finalize_closec	
Csrtd|j}	|j}
|j}|j}t}
tjdkr<|j}|j}nd}z|	z|sT|W|
n|
0zn|}||
urtd||WWdSt	|}|dur||qh|z||W|qh|0qhWnt
yYn0Wq@tyj}zf|r$t|ddt
jkr$WYd}~dStrDtd|WYd}~dS||||WYd}~q@d}~00q@dS)Nz$starting thread to feed data to piperz%feeder thread got sentinel -- exitingerrnorzerror in queue thread: %s)r
rFrOwaitpopleftrsrrrRdumps
IndexError	ExceptiongetattrrvZEPIPErr)rtrur>Z	writelockZreader_closeZwriter_closeZignore_epipeonerrorZ	queue_semZnacquireZnreleaseZnwaitZbpopleftsentinelZwacquireZwreleaserKer&r&r'rjsP





zQueue._feedcCsddl}|dS)z
        Private API hook called when feeding data in the background thread
        raises an exception.  For overriding by concurrent.futures.
        rN)	traceback	print_exc)rrKrr&r&r'rkszQueue._on_queue_feeder_error)r)F)TN)TN)__name__
__module____qualname__r(r,r/r!r rNrUrWrYr[r\r^r_rarcrGstaticmethodrmrprjrkr&r&r&r'r#s0



!
	

>rc@s@eZdZdddZddZddZdd
dZdd
ZddZd	S)rrcCs*tj|||d|d|_||_dS)N)r%r)rr(Z	Semaphore_unfinished_tasksr5_condr"r&r&r'r((szJoinableQueue.__init__cCst||j|jfSr))rr,rrr+r&r&r'r,-szJoinableQueue.__getstate__cCs,t||dd|dd\|_|_dS)N)rr/rrr-r&r&r'r/0szJoinableQueue.__setstate__TNc	Cs|jrtd|d|j||s(t|jh|jB|jdurJ||j	
||j|j
Wdn1s~0YWdn1s0YdSrD)r<rErrFrr2rr9rGr8rHrrOrIrJr&r&r'rN4s

zJoinableQueue.putcCsT|j:|jdstd|jjr2|jWdn1sF0YdS)NFz!task_done() called too many times)rrrFrErVrZZ
notify_allr+r&r&r'	task_doneAs
zJoinableQueue.task_donecCs@|j&|jjs|jWdn1s20YdSr))rrrVrZrwr+r&r&r'rqHszJoinableQueue.join)r)TN)	rrrr(r,r/rNrrqr&r&r&r'r&s


rc@sNeZdZddZddZddZddZd	d
ZddZd
dZ	e
ejZ
dS)rcCsHtjdd\|_|_||_|jj|_tj	dkr:d|_
n
||_
dS)NFrr)rrrrrrrBrCrrr)r#r%r&r&r'r(Ss


zSimpleQueue.__init__cCs|j|jdSr))rr_rr+r&r&r'r_\s
zSimpleQueue.closecCs
|Sr)rXr+r&r&r'rY`szSimpleQueue.emptycCst||j|j|j|jfSr))r	r*rrrrr+r&r&r'r,cs
zSimpleQueue.__getstate__cCs"|\|_|_|_|_|jj|_dSr))rrrrrBrCr-r&r&r'r/gszSimpleQueue.__setstate__cCs:|j|j}Wdn1s&0Yt|Sr))rrr@rRrS)r#rTr&r&r'rUks(zSimpleQueue.getcCsXt|}|jdur"|j|n2|j|j|Wdn1sJ0YdSr))rRryrrr>r]r&r&r'rNqs


zSimpleQueue.putN)rrrr(r_rYr,r/rUrNclassmethodtypesGenericAlias__class_getitem__r&r&r&r'rQs	
r)__all__rrr4r6rPrrnrvZqueuerrZ_multiprocessingrr	Z	reductionZForkingPicklerrRutilr
rrr
robjectrrsrrr&r&r&r'<module>
s&z
+