python (3.11.7)

(root)/
lib/
python3.11/
test/
support/
__pycache__/
interpreters.cpython-311.pyc

edZddlZddlZddlmZmZmZmZgdZdddZ	dZ
d	Zd
ZGddZ
d
ZdZGddZeZGddeZGddeZdS)z"Subinterpreters High Level Module.N)ChannelErrorChannelNotFoundErrorChannelEmptyErroris_shareable)
Interpreterget_currentget_maincreatelist_allSendChannelRecvChannelcreate_channellist_all_channelsrrrrTisolatedcNtj|}t||S)z'Return a new (idle) Python interpreter.r)
_interpretersr
r)rids  M/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/support/interpreters.pyr
r
s(		x	0	0	0BrH----c<dtjDS)z!Return all existing interpreters.c,g|]}t|S)r).0rs  r
<listcomp>zlist_all.<locals>.<listcomp>s???KOO???r)rrrrrrrs??m&<&>&>????rcFtj}t|S)z)Return the currently running interpreter.)rrrrs rrr!s		"	$	$Br??rcFtj}t|S)zReturn the main interpreter.)rr	rrs rr	r	's			!	!Br??rcteZdZdZdddZdZdZdZedZ	ed	Z
d
ZdZddd
Z
dS)rzA single Python interpreter.Nrct|ttjfst	d|||_||_dSNzid must be an int, got )
isinstanceintr
InterpreterID	TypeError_id	_isolated)selfrrs   r__init__zInterpreter.__init__0sE"sM$?@AA	><b<<===!rctt|j|j}d|D}t|jdd|dS)N)rrc3*K|]\}}|d|VdS)=Nr)rkvs   r	<genexpr>z'Interpreter.__repr__.<locals>.<genexpr>8s08841aQ,,,,888888r(z, ))dictr#r&r'itemstype__name__join)r(datakwargss   r__repr__zInterpreter.__repr__6ses48}}t~>>>884::<<888t**%<<		&(9(9<<<<rc*t|jSNhashr&r(s r__hash__zInterpreter.__hash__;DH~~rcZt|tstS|j|jkSr;)r"rNotImplementedr&r(others  r__eq__zInterpreter.__eq__>s)%--	)!!9((rc|jSr;r&r>s rrzInterpreter.idD	xrcZ|jtj|j|_|jSr;)r'ris_isolatedr&r>s rrzInterpreter.isolatedHs(>!+6tx@@DN~rc4tj|jS)z<Return whether or not the identified interpreter is running.)r
is_runningr&r>s rrLzInterpreter.is_runningPs'111rc4tj|jS)zFinalize and destroy the interpreter.

        Attempting to destroy the current interpreter results
        in a RuntimeError.
        )rdestroyr&r>s rclosezInterpreter.closeTs$TX...r)channelsc<tj|j||dS)zqRun the given source code in the interpreter.

        This blocks the current Python thread until done.
        N)r
run_stringr&)r(src_strrPs   rrunzInterpreter.run\s!
	 7H=====r)r5
__module____qualname____doc__r)r9r?rEpropertyrrrLrOrTrrrrr-s&&'+"""""===
)))XX222///+/>>>>>>>rrcltj}t|t|}}||fS)zReturn (recv, send) for a new cross-interpreter channel.

    The channel may be used to pass data safely between interpreters.
    )rchannel_creater
r)cidrecvsends   rrrds5

&
(
(CS!!;s#3#3$D:rc<dtjDS)z4Return a list of (recv, send) for all open channels.cJg|] }t|t|f!Sr)r
r)rr[s  rrz%list_all_channels.<locals>.<listcomp>ps=999

{3//0999r)rchannel_list_allrrrrrns,99$5779999rc@eZdZdZdZdZdZdZedZ	dS)_ChannelEndz/The base class for RecvChannel and SendChannel.czt|ttjfst	d|||_dSr!)r"r#r	ChannelIDr%r&)r(rs  rr)z_ChannelEnd.__init__ws>"sM$;<==	><b<<===rcZt|jdt|jdS)Nz(id=r1)r4r5r#r&r>s rr9z_ChannelEnd.__repr__|s*t**%;;3tx==;;;;rc*t|jSr;r<r>s rr?z_ChannelEnd.__hash__r@rct|trt|tstSnt|tstS|j|jkSr;)r"r
rBrr&rCs  rrEz_ChannelEnd.__eq__sXdK((	"e[11
&%%
&E;//	"!!yDH$$rc|jSr;rGr>s rrz_ChannelEnd.idrHrN)
r5rUrVrWr)r9r?rErXrrrrrbrbtsq99
<<<%%%Xrrbc:eZdZdZedddZefdZdS)r
z1The receiving end of a cross-interpreter channel.g{Gz?)	_sentinel_delayctj|j|}||ur2tj|tj|j|}||u2|S)zReturn the next object from the channel.

        This blocks until an object has been sent, if none have been
        sent already.
        )rchannel_recvr&timesleep)r(rjrkobjs    rr\zRecvChannel.recvs[(9==YJv,TXyAACY
rcz|turtj|jStj|j|S)zReturn the next object from the channel.

        If none have been sent then return the default if one
        is provided or fail with ChannelEmptyError.  Otherwise this
        is the same as recv().
        )_NOT_SETrrmr&)r(defaults  rrecv_nowaitzRecvChannel.recv_nowaits7h -dh777 -dh@@@rN)r5rUrVrWobjectr\rrrtrrrr
r
s];; &




#+
A
A
A
A
A
Arr
ceZdZdZdZdZdS)rz/The sending end of a cross-interpreter channel.cbtj|j|tjddS)z{Send the object (i.e. its data) to the channel's receiving end.

        This blocks until the object is received.
        N)rchannel_sendr&rnror(rps  rr]zSendChannel.sends,
	"48S111	
1




rc6tj|j|S)zSend the object to the channel's receiving end.

        If the object is immediately received then return True
        (else False).  Otherwise this is the same as send().
        )rryr&rzs  rsend_nowaitzSendChannel.send_nowaits)$(C888rN)r5rUrVrWr]r|rrrrrs899				9	9	9	9	9rr)rWrn_xxsubinterpretersrrrrr__all__r
rrr	rrrrbrurrr
rrrr<module>rs((****.....@@@
4>4>4>4>4>4>4>4>n9996688AAAAA+AAA899999+99999r