File "synchronize.cpython-39.pyc"

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

a

XC?hZ-@s"gdZddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	zddlm
Z
mZWneyedYn0e
ed	\ZZej
jZGd
ddeZ
Gdd
d
e
ZGdddeZGddde
ZGddde
ZGdddeZGdddeZGdddejZdS))LockRLock	SemaphoreBoundedSemaphore	ConditionEventN)context)process)util)SemLock
sem_unlinkzThis platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.c@s\eZdZeZddZeddZddZ	ddZ
d	d
ZddZd
dZ
eddZdS)rc	Cs|durtj}|}tjdkp*|dk}tdD]<}z t||||	|}|_
WntyjYq40qzq4tdt
d|j|tjdkrdd}	t||	|j
jdurdd	lm}
|
|j
jd
tj|tj|j
jfdddS)
Nwin32forkdzcannot find name for semaphorezcreated semlock with handle %scSs|jdSN)_semlock_after_fork)objr@/opt/alt/python39/lib64/python3.9/multiprocessing/synchronize.pyrGsz%SemLock.__init__.<locals>._after_forkr)register	semaphorer)Zexitpriority)r	Z_default_contextZget_contextZget_start_methodsysplatformrange_multiprocessingr
_make_namerFileExistsErrorrdebughandle
_make_methodsZregister_after_forknameresource_trackerrZFinalize_cleanup)selfkindvaluemaxvaluectxr#Z
unlink_nowislrrrrr__init__2s2

zSemLock.__init__cCs"ddlm}t|||ddS)Nr)
unregisterr)r$r.r
)r#r.rrrr%TszSemLock._cleanupcCs|jj|_|jj|_dSr)racquirereleaser&rrrr"Zs
zSemLock._make_methodscCs
|jSr)r	__enter__r1rrrr2^szSemLock.__enter__cGs|jj|Sr)r__exit__r&argsrrrr3aszSemLock.__exit__cCsDt||j}tjdkr,t|j}n|j}||j|j	|j
fS)Nr)r	assert_spawningrrrZget_spawning_popenZduplicate_for_childr!r'r)r#)r&r,hrrr__getstate__ds

zSemLock.__getstate__cCs,tjj||_td|d|dS)Nz recreated blocker with handle %rr)rrZ_rebuildrrr r"r&staterrr__setstate__mszSemLock.__setstate__cCsdtjdttjfS)Nz%s-%sZ	semprefix)r
current_processZ_confignextr_randrrrrrrszSemLock._make_nameN)__name__
__module____qualname__tempfileZ_RandomNameSequencer>r-staticmethodr%r"r2r3r8r;rrrrrr.s"
	rc@s&eZdZd	ddZddZddZdS)
rrcCstj|t|t|ddSNr*)rr-	SEMAPHORE
SEM_VALUE_MAXr&r(r*rrrr-}szSemaphore.__init__cCs
|jSr)r
_get_valuer1rrr	get_valueszSemaphore.get_valuecCs6z|j}Wnty$d}Yn0d|jj|fS)Nunknownz<%s(value=%s)>)rrI	Exception	__class__r?r&r(rrr__repr__s

zSemaphore.__repr__N)r)r?r@rAr-rJrOrrrrr{s
rc@seZdZdddZddZdS)rrcCstj|t|||ddSrDrr-rFrHrrrr-szBoundedSemaphore.__init__cCs<z|j}Wnty$d}Yn0d|jj||jjfS)NrKz<%s(value=%s, maxvalue=%s)>)rrIrLrMr?r)rNrrrrOs
zBoundedSemaphore.__repr__N)rr?r@rAr-rOrrrrrs
rc@seZdZddZddZdS)rcCstj|tdd|ddSNrrErPr&r*rrrr-sz
Lock.__init__cCszf|jr8tj}tjdkrd|dtj7}n,|jdkrLd}n|jdkr`d}nd}Wnt	y|d}Yn0d	|j
j|fS)
N
MainThread|rNonerSomeOtherThreadSomeOtherProcessrKz<%s(owner=%s)>)r_is_miner
r<r#	threadingcurrent_threadrI_countrLrMr?)r&r#rrrrOs


z
Lock.__repr__NrQrrrrrsrc@seZdZddZddZdS)rcCstj|tdd|ddSrR)rr-RECURSIVE_MUTEXrSrrrr-szRLock.__init__cCsz||jrBtj}tjdkr6|dtj7}|j}n8|jdkrZd\}}n |jdkrrd\}}nd\}}Wnt	yd\}}Yn0d	|j
j||fS)
NrTrUr)rVrr)rWnonzero)rXr^)rKrK<%s(%s, %s)>)rrYr
r<r#rZr[r\rIrLrMr?)r&r#countrrrrOs



zRLock.__repr__NrQrrrrrsrc@sleZdZdddZddZddZdd	Zd
dZdd
ZddZ	dddZ
dddZddZdddZ
dS)rNcCs>|p
||_|d|_|d|_|d|_|dSNr)r_lockr_sleeping_count_woken_count_wait_semaphorer")r&lockr*rrrr-s
zCondition.__init__cCst||j|j|j|jfSr)r	r6rbrcrdrer1rrrr8s
zCondition.__getstate__cCs |\|_|_|_|_|dSr)rbrcrdrer"r9rrrr;s
zCondition.__setstate__cCs
|jSr)rbr2r1rrrr2szCondition.__enter__cGs|jj|Sr)rbr3r4rrrr3szCondition.__exit__cCs|jj|_|jj|_dSr)rbr/r0r1rrrr"s
zCondition._make_methodscCsHz|jj|jj}Wnty2d}Yn0d|jj|j|fS)NrKr_)rcrrIrdrLrMr?rb)r&Znum_waitersrrrrOs


zCondition.__repr__c	Cs|jjsJd|j|jj}t|D]}|jq2zD|jd|W|j	t|D]}|jqdS]}|jqvn$|j	t|D]}|jq0dS)Nz,must acquire() condition before using wait()T)
rbrrYrcr0r\rrer/rd)r&timeoutr`r+rrrwaits&


zCondition.waitrcCs|jjsJd|jdr(Jd|jdrN|jd}|s(Jdq(d}||krz|jdrz|j|d7}qR|rt|D]}|jq|jdrqdS)Nzlock is not ownedFz<notify: Should not have been able to acquire _wait_semaphorez>notify: Bug in sleeping_count.acquire- res should not be Falserr)	rbrrYrer/rdrcr0r)r&nresZsleepersr+rrrnotifys$

zCondition.notifycCs|jtjddS)N)ri)rkrmaxsizer1rrr
notify_all(szCondition.notify_allcCsd|}|r|S|dur$t|}nd}d}|s`|durN|t}|dkrNq`|||}q,|Sra)time	monotonicrh)r&Z	predicatergresultZendtimeZwaittimerrrwait_for+s
zCondition.wait_for)N)N)r)N)r?r@rAr-r8r;r2r3r"rOrhrkrmrqrrrrrs


rc@s6eZdZddZddZddZddZdd
dZd	S)
rcCs |||_|d|_dSra)rr_condr_flagrSrrrr-CszEvent.__init__cCsR|j8|jdr.|jWddSWddS1sD0YdSNFT)rrrsr/r0r1rrris_setGs

zEvent.is_setcCsJ|j0|jd|j|jWdn1s<0YdSNF)rrrsr/r0rmr1rrrsetNs
z	Event.setcCs6|j|jdWdn1s(0YdSrv)rrrsr/r1rrrclearTszEvent.clearNcCsv|j\|jdr |jn|j||jdrR|jWddSWddS1sh0YdSrt)rrrsr/r0rh)r&rgrrrrhXs
z
Event.wait)N)r?r@rAr-rurwrxrhrrrrrAs
rc@sZeZdZdddZddZddZedd	Zejd
d	ZeddZ	e	jd
dZ	dS)BarrierNc	CsRddl}ddlm}||dd}|}||||||fd|_d|_dS)Nrr)
BufferWrapperr+r)structheaprzZcalcsizerr;_stater\)	r&Zpartiesactionrgr*r{rzwrapperZcondrrrr-jszBarrier.__init__cCs.|\|_|_|_|_|_|jd|_dS)Nr+)_parties_action_timeoutrr_wrapperZcreate_memoryviewcast_arrayr9rrrr;sszBarrier.__setstate__cCs|j|j|j|j|jfSr)rrrrrrr1rrrr8xszBarrier.__getstate__cCs
|jdSrarr1rrrr}|szBarrier._statecCs||jd<dSrarrNrrrr}scCs
|jdSNrrr1rrrr\szBarrier._countcCs||jd<dSrrrNrrrr\s)NN)
r?r@rAr-r;r8propertyr}setterr\rrrrryhs
	


ry)__all__rZrrBrrnr	r
rrr
ImportErrorlistrr]rFrGobjectrrrrrrryrrrr<module>
s,	Mo'