+\h UdZddlmZddlZddlZddlZddlZddlZddlmZddl m Z m Z m Z ddl ZeedZej"Zded<e d Zej*d k\rej,Zej.Zn,ej0j,Zej0j.Zdd Zdd Z d dd ZdddZddZddZddZy)z@Internal helpers for lock and condition coordination primitives.) annotationsN)wait_for)AnyOptionalTypeVarregister_at_forkzweakref.WeakSet[threading.Lock]_forkable_locks_T) cdtj}trtj ||S)zpRepresents a lock that is tracked upon instantiation using a WeakSet and reset by pymongo upon forking. ) threadingLock_HAS_REGISTER_AT_FORKr addlocks O/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pymongo/lock.py _create_lockr.s& >> DD! KctS)zRepresents an asyncio.Lock.)rrr_async_create_lockr8s 6Mrc@|r||Stj|S)z!Represents a threading.Condition.)r Conditionrcondition_classs r_create_conditionr=s#t$$   t $$rc,|r||St|S)z Represents an asyncio.Condition.)rrs r_async_create_conditionr Fst$$ T?rc\tD]#}|js|j%yN)r lockedreleasers r_release_locksr%Ms# ;;= LLNrcK t|j|d{S7#tj$rYywxYww)NF)rwaitasyncio TimeoutError conditiontimeouts r_async_cond_waitr-Ts<inn.8888   s,A(&(A(>A>Ac$|j|Sr")r'r*s r _cond_waitr/[s >>' ""r)returnthreading.Lock)r0rr")rr1r Optional[Any]r0threading.Condition)rrrr2r0r)r0None)r+rr,Optional[float]r0bool)r+r3r,r5r0r6) __doc__ __future__rr(ossysrweakrefrtypingrrrpymongo._asyncio_lockpymongohasattrrWeakSetr __annotations__r version_inforr _asyncio_lockrrrr r%r-r/rrrrDsG" ))$674C7??3D0D T]w <