*j/ S r SSKrSSKrSSKrSSKrSSKJr SSK
Jr SSKJ
r SSKJr / SQr\R* r\R. r\R2 r\R6 r\R: r\R> r\R@ r \RB r!\RD r"\RF r# \RH r$Sr%\RM S 5 \RP r) \RT r+\RX r,C SSKJ-r. Sq0Sq1S
r2S r3S r4S r5S r6S r7\r8S r* " S S5 r9\9r: " S S5 r; " S S5 r< " S S\<5 r= " S S5 r> " S S5 r? " S S!\@5 rA\" S"5 R rCS# rD\*" 5 qE0 rF0 rG\" 5 rH " S$ S%5 rI SS&KJJqKJLrM [ rRS- rS " S. S/\I5 rT " S0 S1\I5 rU\." 5 rV " S2 S35 rW " S4 S5\I5 rXS6 rYS7 rZS8 r[S9 r\S: r]S; r^/ r_S
q`S< raSS=KJbrb \U" 5 qcS> rS? rdS@ re\f" \SA5 ( a \R " \eSB9 gg! \ a
SSKJr GNf = f! \' a S
r% GNtf = f! \' a Sr+ GNjf = f! \ a
SSK/J.r. GNif = f! \ a SS'KNJOrP SS(KJQrQ \Q" S)S*5 rLS+ rMS, qK Nf = f)Cz;Thread module emulating a subset of Java's threading model. N) monotonic)WeakSet)count)deque) get_identactive_count Conditioncurrent_thread enumeratemain_threadTIMEOUT_MAXEventLockRLock SemaphoreBoundedSemaphoreThreadBarrierBrokenBarrierErrorTimerThreadError
setprofilesettracelocal
stack_size
excepthookExceptHookArgsgettrace
getprofilesetprofile_all_threadssettrace_all_threadsT
get_native_idF)_local)r c U q g)zSet a profile function for all threads started from the threading module.
The func will be passed to sys.setprofile() for each thread, before its
run() method is called.
N
_profile_hookfuncs 0/opt/alt/python313/lib64/python3.13/threading.pyr r H s M c F [ U 5 [ R " U 5 g)zSet a profile function for all threads started from the threading module
and all Python threads that are currently executing.
The func will be passed to sys.setprofile() for each thread, before its
run() method is called.
N)r _sys_setprofileallthreadsr' s r) r r Q s tt$r* c [ $ )z;Get the profiler function as set by threading.setprofile().r% r* r) r r [ s r* c U q g)zSet a trace function for all threads started from the threading module.
The func will be passed to sys.settrace() for each thread, before its run()
method is called.
N_trace_hookr' s r) r r _ s Kr* c F [ U 5 [ R " U 5 g)zSet a trace function for all threads started from the threading module
and all Python threads that are currently executing.
The func will be passed to sys.settrace() for each thread, before its run()
method is called.
N)r r, _settraceallthreadsr' s r) r! r! h s
TNT"r* c [ $ )z6Get the trace function as set by threading.settrace().r1 r/ r* r) r r r s r* c U ( d U( a [ R " S[ SS9 [ c [ U 0 UD6$ [ U 0 UD6$ )a Factory function that returns a new reentrant lock.
A reentrant lock must be released by the thread that acquired it. Once a
thread has acquired a reentrant lock, the same thread may acquire it again
without blocking; the thread must release it once for each time it has
acquired it.
zDPassing arguments to RLock is deprecated and will be removed in 3.15
stacklevel)warningswarnDeprecationWarning_CRLock_PyRLock)argskwargss r) r r z sE v
R
(((D#F##r* c \ \ rS rSrSrS rS rS rSS jr\r S r
S rS rS
r
S rS rS
rg)_RLock a This class implements reentrant lock objects.
A reentrant lock must be released by the thread that acquired it. Once a
thread has acquired a reentrant lock, the same thread may acquire it
again without blocking; the thread must release it once for each time it
has acquired it.
c > [ 5 U l S U l SU l g Nr )_allocate_lock_block_owner_countselfs r) __init___RLock.__init__ s $&r* c B U R n [ U R nSU R R 5 ( a SOSU R R U R R UU R [ [ U 5 5 4- $ ! [ a N|f = f)Nz)<%s %s.%s object owner=%r count=%d at %s>lockedunlocked)rH _activenameKeyErrorrG rO __class__
__module____qualname__rI hexid)rK owners r) __repr___RLock.__repr__ s EN''E ;**,,H*NN%%NN''KK4M
>
s B
BBc T U R R 5 S U l SU l g rE )rG _at_fork_reinitrH rI rJ s r) r] _RLock._at_fork_reinit s ##%r* c [ 5 nU R U:X a U =R S-
sl gU R R X5 nU( a
X0l SU l U$ )a} Acquire a lock, blocking or non-blocking.
When invoked without arguments: if this thread already owns the lock,
increment the recursion level by one, and return immediately. Otherwise,
if another thread owns the lock, block until the lock is unlocked. Once
the lock is unlocked (not owned by any thread), then grab ownership, set
the recursion level to one, and return. If more than one thread is
blocked waiting until the lock is unlocked, only one at a time will be
able to grab ownership of the lock. There is no return value in this
case.
When invoked with the blocking argument set to true, do the same thing
as when called without arguments, and return true.
When invoked with the blocking argument set to false, do not block. If a
call without an argument would block, return false immediately;
otherwise, do the same thing as when called without arguments, and
return true.
When invoked with the floating-point timeout argument set to a positive
value, block for at most the number of seconds specified by timeout
and as long as the lock cannot be acquired. Return true if the lock has
been acquired, false if the timeout has elapsed.
)r rH rI rG acquire)rK blockingtimeoutmercs r) ra _RLock.acquire sP 4 [;;"KK1K
[[
3
KDK r* c U R [ 5 :w a [ S5 eU R S-
=U l nU( d" SU l U R R 5 gg)a Release a lock, decrementing the recursion level.
If after the decrement it is zero, reset the lock to unlocked (not owned
by any thread), and if any other threads are blocked waiting for the
lock to become unlocked, allow exactly one of them to proceed. If after
the decrement the recursion level is still nonzero, the lock remains
locked and owned by the calling thread.
Only call this method when the calling thread owns the lock. A
RuntimeError is raised if this method is called when the lock is
unlocked.
There is no return value.
cannot release un-acquired lockr` N)rH r RuntimeErrorrI rG release)rK r s r) rj _RLock.release sQ ;;)+%@AA"kkAo-eDKKK! r* c $ U R 5 g Nrj rK tvtbs r) __exit___RLock.__exit__ r* c V U R R 5 Uu U l U l g rm )rG ra rI rH )rK states r) _acquire_restore_RLock._acquire_restore s #( T[r* c U R S:X a [ S5 eU R nSU l U R nS U l U R R 5 X4$ )Nr rh )rI ri rH rG rj )rK r rY s r)
_release_save_RLock._release_save sR ;;!@AA~r* c 0 U R [ 5 :H $ rm )rH r rJ s r) _is_owned_RLock._is_owned s {{ik))r* c L U R [ 5 :w a gU R $ rE )rH r rI rJ s r) _recursion_count_RLock._recursion_count s ;;)+%{{r* )rG rI rH N)T)__name__rU rV __firstlineno____doc__rL rZ r] ra __enter__rj rs rx r{ r~ r __static_attributes__r/ r* r) rB rB sA
"H I".
)*
r* rB c v \ rS rSrSrSS jrS rS rS rS r S r
S
rS rSS jr
SS
jrSS jrS rS rSrg)r i
aR Class that implements a condition variable.
A condition variable allows one or more threads to wait until they are
notified by another thread.
If the lock argument is given and not None, it must be a Lock or RLock
object, and it is used as the underlying lock. Otherwise, a new RLock object
is created and used as the underlying lock.
Nc X Uc
[ 5 nXl UR U l UR U l [ US5 ( a UR
U l [ US5 ( a UR U l [ US5 ( a UR U l [ 5 U l g )Nr{ rx r~ )
r _lockra rj hasattrr{ rx r~ _deque_waiters)rK locks r) rL Condition.__init__ s <7D
|||| 4))!%!3!3D4+,,$($9$9D!4%%!^^DN
r* c l U R R 5 U R R 5 g rm )r r] r clearrJ s r) r] Condition._at_fork_reinit+ s"
""$
r* c 6 U R R 5 $ rm )r r rJ s r) r Condition.__enter__/ s zz##%%r* c 4 U R R " U6 $ rm )r rs )rK r? s r) rs Condition.__exit__2 s zz""D))r* c J SU R [ U R 5 4- $ )Nz