+
    i-  c                   s(   ^ RI t ^ RIt^ RIt^RIHt ^RIHt R)t ! R R]4      t ! R R]4      t	 ! R R	]4      t
 ! R
 R]4      t ! R R]4      t ! R R]P                  4      t ! R R]4      t]P"                  R8w  d    ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]4      t ! R R]4      t ! R R]4      tR]! 4       R ]! 4       R!]! 4       /t]P2                  '       d"   ]P"                  R"8w  d   ]! ]R!,          4      tMH]! ]R ,          4      tM8 ! R# R]P                  4      t ! R$ R]4      tR ]! 4       /t]! ]R ,          4      tR% t]P8                  ! 4       tR& tR' tR( t R# )*    N)process)	reductionc                   s    ] tR t^tRtR# )ProcessError N__name__
__module____qualname____firstlineno____static_attributes__r       0/usr/lib64/python3.14/multiprocessing/context.pyr   r          r   r   c                   s    ] tR t^tRtR# )BufferTooShortr   Nr   r   r   r   r   r      r   r   r   c                   s    ] tR t^tRtR# )TimeoutErrorr   Nr   r   r   r   r   r      r   r   r   c                   s    ] tR t^tRtR# )AuthenticationErrorr   Nr   r   r   r   r   r      r   r   r   c                   s  a  ] tR t^t o ]t]t]t]t]! ]	P                  4      t
]! ]	P                  4      t]! ]	P                  4      tR tR tR#R ltR tR tR$R ltR%R	 ltR%R
 ltR tR&R ltR'R ltR'R ltR tR(R ltR tR tRR/R ltRR/R ltR tR t R$R lt!R t"R t#R t$R$R lt%R)R lt&R)R lt'](R 4       t)])PT                  R  4       t)R! t+R"t,V t-R# )*BaseContextc                sN    \         P                  ! 4       pVf   \        R4      hV# )z(Returns the number of CPUs in the systemzcannot determine number of cpus)os	cpu_countZNotImplementedError)selfZnum   & r   r   ZBaseContext.cpu_count)   s#    lln;%&GHHJr   c                s`    ^RI Hp V! V P                  4       R7      pVP                  4        V# )zReturns a manager associated with a running server process

The managers methods such as `Lock()`, `Condition()` and `Queue()`
can be used to create shared objects.
)SyncManagerctx)Zmanagersr   get_contextZstart)r   r   Zms   &  r   ManagerZBaseContext.Manager1   s(     	*D,,./		r   Tc                    ^RI Hp V! V4      # )z1Returns two connection object connected by a pipe)Pipe)
connectionr   )r   Zduplexr      && r   r   ZBaseContext.Pipe<   s    $F|r   c                <    ^RI Hp V! V P                  4       R7      # )z#Returns a non-recursive lock object)Lockr   )synchronizer    r   )r   r    r   r   r    ZBaseContext.LockA   s    %((*++r   c                r   )zReturns a recursive lock object)RLockr   )r!   r"   r   )r   r"   r   r   r"   ZBaseContext.RLockF       &))+,,r   Nc                <    ^RI Hp V! WP                  4       R7      # )zReturns a condition object)	Conditionr   )r!   r%   r   )r   lockr%   r   r   r%   ZBaseContext.ConditionK   s    *#3#3#566r   c                r$   )zReturns a semaphore object)	Semaphorer   )r!   r'   r   )r   valuer'   r   r   r'   ZBaseContext.SemaphoreP   s    *$4$4$677r   c                r$   )z"Returns a bounded semaphore object)BoundedSemaphorer   )r!   r)   r   )r   r(   r)   r   r   r)   ZBaseContext.BoundedSemaphoreU   s    1+;+;+=>>r   c                r   )zReturns an event object)Eventr   )r!   r*   r   )r   r*   r   r   r*   ZBaseContext.EventZ   r#   r   c                s>    ^RI Hp V! WW0P                  4       R7      # )zReturns a barrier object)Barrierr   )r!   r+   r   )r   ZpartiesZactionZtimeoutr+   s   &&&& r   r+   ZBaseContext.Barrier_   s    (w5E5E5GHHr   c                r$   )Returns a queue object)Queuer   )queuesr-   r   )r   maxsizer-   r   r   r-   ZBaseContext.Queued   s    !W"2"2"455r   c                r$   )r,   )JoinableQueuer   )r.   r0   r   )r   r/   r0   r   r   r0   ZBaseContext.JoinableQueuei   s    )W*:*:*<==r   c                r   )r,   )SimpleQueuer   )r.   r1   r   )r   r1   r   r   r1   ZBaseContext.SimpleQueuen   s    't//122r   c                s@    ^RI Hp V! WW4V P                  4       R7      # )zReturns a process pool object)Pool)context)Zpoolr2   r   )r   Z	processesZinitializerZinitargsZmaxtasksperchildr2   s   &&&&& r   r2   ZBaseContext.Pools   s$     	IH ,,.0 	0r   c                s"    ^RI Hp V! V.VO5!  # )zReturns a shared object)RawValue)sharedctypesr4   )r   typecode_or_typeargsr4   s   &&* r   r4   ZBaseContext.RawValuez   s    *(0400r   c                s    ^RI Hp V! W4      # )zReturns a shared array)RawArray)r5   r8   )r   r6   size_or_initializerr8   s   &&& r   r8   ZBaseContext.RawArray   s    *(>>r   r&   c               sF    ^RI Hp V! V.VO5RVRV P                  4       / # )z$Returns a synchronized shared object)Valuer&   r   )r5   r:   r   )r   r6   r&   r7   r:   s   &&$* r   r:   ZBaseContext.Value   s4    '% - -4 -))+- 	-r   c               s@    ^RI Hp V! WVV P                  4       R7      # )z#Returns a synchronized shared array)Array)r&   r   )r5   r;   r   )r   r6   r9   r&   r;   s   &&&$ r   r;   ZBaseContext.Array   s#    '%))+- 	-r   c                s    V P                  4       R8X  d)   \        \        RR4      '       d   ^RIHp V! 4        R# R# R# )z{Check whether this is a fake forked process in a frozen executable.
If so then run code specified by commandline and exit.
spawnZfrozenF)freeze_supportN)get_start_methodgetattrsysr<   r=   )r   r=   r   r   r=   ZBaseContext.freeze_support   s5       "g-'#x2O2O- 3P-r   c                s    ^RI Hp V! 4       # )zJReturn package logger -- if it does not already exist then
it is created.
)
get_logger)utilrA   )r   rA   r   r   rA   ZBaseContext.get_logger   s     	%|r   c                r   )z8Turn on logging and add a handler which prints to stderr)log_to_stderr)rB   rC   )r   ZlevelrC   r   r   rC   ZBaseContext.log_to_stderr   s    'U##r   c                s    ^RI Hp R# )zFInstall support for sending connections and sockets
between processes
)r   N) r   )r   r   r   r   allow_connection_picklingZ%BaseContext.allow_connection_pickling   s     	!r   c                "    ^RI Hp V! V4       R# )zSets the path to a python.exe or pythonw.exe binary used to run
child processes instead of sys.executable when using the 'spawn'
start method.  Useful for people embedding Python.
)set_executableN)r<   rG   )r   Z
executablerG   r   r   rG   ZBaseContext.set_executable   s    
 	*z"r   c                rF   )z[Set list of module names to try to load in forkserver process.
This is really just a hint.
)set_forkserver_preloadN)
forkserverrH   )r   Zmodule_namesrH   r   r   rH   Z"BaseContext.set_forkserver_preload   s     	7|,r   c                s    Vf   V #  \         V,          pTP                  4        T#   \         d    \        RT,          4      R hi ; i)Nzcannot find context for %r)_concrete_contextsZKeyError
ValueError_check_available)r   methodr   r   r   r   ZBaseContext.get_context   sU    >K	N$V,C 	
  	N9FBCM	Ns	   ' Ac                s    V P                   # N)_namer   Z
allow_none   &&r   r>   ZBaseContext.get_start_method   s    zzr   c                s    \        R 4      h)z+cannot set start method of concrete context)rK   r   rM   Zforce   &&&r   set_start_methodZBaseContext.set_start_method   s    FGGr   c                s4    \        4       P                  R4      # )zWControls how objects will be reduced to a form that can be
shared with other processes.r   )globalsZgetr      &r   reducerBaseContext.reducer   s     y}}[))r   c                s     V\        4       R &   R# )r   N)rU   )r   r   rQ   r   rX   rY      s    !*	+r   c                    R # rN   r   rV   rW   r   rL   ZBaseContext._check_available   s    r   r   )TrN   )   )NN)r    )NNr   NF).r   r   r   r	   r   r   r   r   staticmethodr   Zcurrent_processZparent_processZactive_childrenr   r   r   r    r"   r%   r'   r)   r*   r+   r-   r0   r1   r2   r4   r8   r:   r;   r=   rA   rC   rE   rG   rH   r   r>   rT   ZpropertyrX   ZsetterrL   r
   __classdictcell____classdict__   @r   r   r      s    L#NL-"7#:#:;O!'"8"89N"7#:#:;O	
,
-
7
8
?
-
I
6
>
3
01
?
-$ --4 -$
!#-H * *
 ^^+ + r   r   c                   sD   a  ] tR t^t o Rt]R 4       t]R 4       tRtV t	R# )ProcessNc                s\    \         P                  4       P                  P                  V 4      # rN   )_default_contextr   rb   _Popen)process_objrW   r   rd   ZProcess._Popen   s"    ++-55<<[IIr   c                 sZ    \         P                  4       P                  P                  4       # rN   )rc   r   rb   _after_forkr   r   r   rf   ZProcess._after_fork   s     ++-55AACCr   r   
r   r   r   r	   _start_methodr]   rd   rf   r
   r^   r_   ra   r   rb   rb      s4     MJ J D Dr   rb   c                   sZ   a a ] tR t^t o]tR tRV 3R lltRR ltRR ltR t	Rt
VtV ;t# )	DefaultContextc                s     Wn         R V n        R # rN   )rc   _actual_context)r   r3   rQ   r   __init__ZDefaultContext.__init__   s     '#r   c                s   < Vf,   V P                   f   V P                  V n         V P                   # \        SV `  V4      # rN   )rj   rc   Zsuperr   )r   rM   	__class__s   &&r   r   ZDefaultContext.get_context   s>    >##+'+'<'<$'''7&v..r   c                s    V P                   e   V'       g   \        R4      hVf   V'       d
   R V n         R # V P                  V4      V n         R # )Nzcontext has already been set)rj   RuntimeErrorr   rR   rS   r   rT   ZDefaultContext.set_start_method   sA    +E=>>>e#'D #//7r   c                s    V P                   f   V'       d   R # V P                  V n         V P                   P                  # rN   )rj   rc   rO   rP   rQ   r   r>   ZDefaultContext.get_start_method   s4    '#'#8#8D ##)))r   c                s   a V P                   P                  4       oS.pVP                  V3R l\         4       4       V# )z=Returns a list of the supported start methods, default first.c              3   s8   <"   T F  qS8w  g   K  Vx  K  	  R # 5irN   r   )Z.0Znamedefaults   & r   Z	<genexpr>Z7DefaultContext.get_all_start_methods.<locals>.<genexpr>  s      "
/T7?DD/s   
)rc   r>   ZextendrJ   )r   Zstart_method_namesrn   s   & @r   get_all_start_methodsZ$DefaultContext.get_all_start_methods  sB    ''88:%Y!! "
/"
 	
 "!r   )rj   rc   rN   r\   )r   r   r   r	   rb   rk   r   rT   r>   ro   r
   r^   Z__classcell__)rl   r`   s   @@r   ri   ri      s(     G$/8*" "r   ri   Zwin32c                   4   a  ] tR tRt o Rt]R 4       tRtV tR# )ForkProcessi  forkc                    ^RI Hp V! V 4      # r[   )Popen)Z
popen_forkru   re   ru   r   r   rd   ZForkProcess._Popen  s    )%%r   r   N	r   r   r   r	   rh   r]   rd   r
   r^   r_   ra   r   rq   rq     s     		& 
	&r   rq   c                   D   a  ] tR tRt o Rt]R 4       t]R 4       tRtV t	R# )SpawnProcessi  r<   c                rs   rt   )Zpopen_spawn_posixru   rv   r   r   rd   SpawnProcess._Popen      0%%r   c                 rZ   rN   r   r   r   r   rf   SpawnProcess._after_fork"       r   r   Nrg   r_   ra   r   ry   ry     0     		& 
	& 
	 
	r   ry   c                   rp   )ForkServerProcessi'  rI   c                rs   rt   )Zpopen_forkserverru   rv   r   r   rd   ZForkServerProcess._Popen)  s    /%%r   r   Nrw   r_   ra   r   r   r   '  s     $		& 
	&r   r   c                       ] tR tRtRt]tRtR# )ForkContexti.  rr   r   N)r   r   r   r	   rO   rq   rb   r
   r   r   r   r   r   .  s    r   r   c                   r   )SpawnContexti2  r<   r   Nr   r   r   r	   rO   ry   rb   r
   r   r   r   r   r   2      r   r   c                   s.   a  ] tR tRt o Rt]tR tRtV t	R# )ForkServerContexti6  rI   c                sH    \         P                  '       g   \        R 4      hR# )z%forkserver start method not availableN)r   HAVE_SEND_HANDLErK   rV   rW   r   rL   Z"ForkServerContext._check_available9  s    --- !HII .r   r   N)
r   r   r   r	   rO   r   rb   rL   r
   r^   r_   ra   r   r   r   6  s     #	J 	Jr   r   rr   r<   rI   Zdarwinc                   rx   )ry   iL  r<   c                rs   rt   )Zpopen_spawn_win32ru   rv   r   r   rd   rz   N  r{   r   c                 rZ   rN   r   r   r   r   rf   r|   S  r}   r   r   Nrg   r_   ra   r   ry   ry   L  r~   r   c                   r   )r   iX  r<   r   Nr   r   r   r   r   r   X  r   r   c                 s2    \         V ,          \        n        R # rN   )rJ   rc   rj   )rM   rW   r   _force_start_methodr   e  s    '9&'A$r   c                  s$    \        \        R R4      # )spawning_popenN)r?   _tlsr   r   r   get_spawning_popenr   n  s    4)400r   c                 s    V \         n        R # rN   )r   r   )ZpopenrW   r   set_spawning_popenr   q  s
    Dr   c                 sh    \        4       f&   \        R\        V 4      P                  ,          4      hR # )NzF%s objects should only be shared between processes through inheritance)r   rm   Ztyper   )ZobjrW   r   assert_spawningr   t  s4    ##%)#Y%7%78 	 $r   r   )!r   r@   Z	threadingrD   r   r   Z__all__Z	Exceptionr   r   r   r   Zobjectr   ZBaseProcessrb   ri   Zplatformrq   ry   r   r   r   r   rJ   r   rc   r   Zlocalr   r   r   r   r   r   r   <module>r      s   	 
   
	9 		\ 		< 		, 	x& x|Dg!! D%"[ %"X <<7&g)) &
w** 
&G// &k { JK J 	') !!!cllh&>)*<\*JK)*<W*EF
w** 
{ 
 	 &&8&ABB 1 r   