+
    8i'                        R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	H
t
 ^ RIHt ^ RIHt ^ RIHt Rt ! R R	4      t ! R
 R4      t]! 4       tR R ltR R ltR R ltR# )z-Run a target function on a background thread.)annotationsN)AnyOptional)_csot)create_task)_create_lockFc                      ] tR t^!tRR R lltR R ltR R ltRR R	 lltRR
 R lltR R lt	R R lt
R R ltR R ltRtR# )AsyncPeriodicExecutorNc               (    V ^8  d   QhRRRRRRRR/#    intervalfloatmin_intervaltargetr   namezOptional[str] )formats   "W/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pymongo/periodic_executor.py__annotate__"AsyncPeriodicExecutor.__annotate__"   s2     ! !! ! 	!
 !    c                n    RV n         Wn        W n        W0n        RV n        RV n        W@n        RV n        R# )aM  Run a target function periodically on a background task.

If the target's return value is false, the executor stops.

:param interval: Seconds between calls to `target`.
:param min_interval: Minimum seconds between calls if `wake` is
    called very often.
:param target: A function.
:param name: A name to give the underlying task.
FN)_event	_interval_min_interval_target_stopped_task_name_skip_sleepselfr   r   r   r   s   &&&&&r   __init__AsyncPeriodicExecutor.__init__"   s6    " !)26

 r   c                   V ^8  d   QhRR/# r   returnstrr   )r   s   "r   r   r   <        Z Z# Zr   c                	j    R V P                   P                   RV P                   R\        V 4      R R2# <z(name=z) object at 0xx>	__class____name__r   idr"   s   &r   __repr__AsyncPeriodicExecutor.__repr__<   4    4>>**+6$**^BtHUV<WXYYr   c                   V ^8  d   QhRR/# r   r'   Noner   )r   s   "r   r   r   ?   s     C Cd Cr   c                P   RV n         V P                  ea   V P                  P                  4       '       dq   V P                  P                  4       '       gO   V P                  P	                  4       '       g-   \        V P                  4       V P                  R7      V n        R# R# R# R# )z%Start. Multiple calls have no effect.FN)r   )r   r   done	cancelled
cancellingr   _runr   r3   s   &r   openAsyncPeriodicExecutor.open?   sm    ::JJOOdjj&:&:&<&<TZZEZEZE\E\$TYY[tzzBDJ F]&<r   c                    V ^8  d   QhRRRR/# r   dummyr   r'   r9   r   )r   s   "r   r   r   H   s        3  $  r   c                h    RV n         V P                  e   V P                  P                  4        R# R# zStop. To restart, call open().

The dummy parameter allows an executor's close method to be a weakref
callback; see monitor.py.
TN)r   r   cancelr"   rC   s   &&r   closeAsyncPeriodicExecutor.closeH   s*     ::!JJ "r   c                    V ^8  d   QhRRRR/# r   timeoutzOptional[int]r'   r9   r   )r   s   "r   r   r   R   s     > >- >4 >r   c                	   "   V P                   e.   \        P                  ! V P                   .VR7      G R j  xL
  R # R #  L5i)N)rL   )r   asynciowaitr"   rL   s   &&r   joinAsyncPeriodicExecutor.joinR   s1     ::!,,

|W=== "=s   5AA 	Ac                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r   V         d r   c                    RV n         R# z!Execute the target function soon.TNr   r3   s   &r   wakeAsyncPeriodicExecutor.wakeV   	    r   c                    V ^8  d   QhRRRR/# r   new_intervalintr'   r9   r   )r   s   "r   r   r   Z        & &C &D &r   c                	    Wn         R # Nr   r"   r]   s   &&r   update_interval%AsyncPeriodicExecutor.update_intervalZ       %r   c                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r   ]           D  r   c                	    R V n         R# TNr    r3   s   &r   
skip_sleep AsyncPeriodicExecutor.skip_sleep]   
    r   c                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r   `   s        D  r   c                	  "   \         P                  ! 4        V P                  '       Eg   V P                  '       d1   V P                  P	                  4       '       d   \
        P                  h V P                  4       G R j  xL
 '       g
   RV n        R #  T P                  '       d	   RT n	        M\        P                  ! 4       T P                  ,           pT P                  '       gX   \        P                  ! 4       T8  d>   \
        P                  ! T P                  4      G R j  xL
  T P                  '       g   Kh   RT n        EK1  R #  L  \         d
    RT n        h i ; i L>5i)NTF)r   	reset_allr   r   r=   rN   CancelledErrorr   BaseExceptionr    time	monotonicr   sleepr   r   r"   deadlines   & r   r>   AsyncPeriodicExecutor._run`   s     ---zzzdjj3355,,,!\\^++$(DM , #( >>+dnn<---DNN,<x,G!--(:(:;;;{{{DK+   , !  $ <sc   (E&E&E&E&.E E	E E E&(?E&(=E&%E$&E&>E&E E!!E&)r   r   r   r   r    r   r   r   ra   )r1   
__module____qualname____firstlineno__r#   r4   r?   rH   rQ   rX   rd   rl   r>   __static_attributes__r   r   r   r	   r	   !   s6    !4ZC >&    r   r	   c                      ] tR t^{tRR R lltR R ltR R ltRR R	 lltRR
 R lltR R lt	R R lt
R R ltR R ltR R ltRtR# )PeriodicExecutorNc               (    V ^8  d   QhRRRRRRRR/# r   r   )r   s   "r   r   PeriodicExecutor.__annotate__|   s2     $ $$ $ 	$
 $r   c                    RV n         Wn        W n        W0n        RV n        RV n        W@n        RV n        RV n        \        4       V n
        R# )aQ  Run a target function periodically on a background thread.

If the target's return value is false, the executor stops.

:param interval: Seconds between calls to `target`.
:param min_interval: Minimum seconds between calls if `wake` is
    called very often.
:param target: A function.
:param name: A name to give the underlying thread.
FN)r   r   r   r   r   _threadr   r    _thread_will_exitr   _lockr!   s   &&&&&r   r#   PeriodicExecutor.__init__|   sG    * !)37
 !&!^
r   c                   V ^8  d   QhRR/# r&   r   )r   s   "r   r   r      r)   r   c                	j    R V P                   P                   RV P                   R\        V 4      R R2# r+   r/   r3   s   &r   r4   PeriodicExecutor.__repr__   r6   r   c                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r      s     ' 'd 'r   c                "   V P                   ;_uu_ 4        V P                  '       d,    V P                  f   Q hV P                  P                  4        RV n        RV n        RRR4       Rp V P                  ;'       d    V P                  P                  4       pV'       gm   \        P                  ! V P                  V P                  R7      pRVn        \        P                  ! V4      V n        \        V 4        VP                  4        R# R#   \         d     Li ; i  + '       g   i     L; i  \         d     Li ; i  \          d?   pR\#        T4      9   g   \$        P&                  ! 4       '       d   RT n         Rp?R# h Rp?ii ; i)zWStart. Multiple calls have no effect.

Not safe to call from multiple threads at once.
NF)r   r   Tzinterpreter shutdown)r   r   r   rQ   ReferenceErrorr   is_alive	threadingThreadr>   r   daemonweakrefproxy_register_executorstartRuntimeErrorr(   sysis_finalizing)r"   startedthreades   &   r   r?   PeriodicExecutor.open   s6   
 ZZZ%%%
<<333LL%%' &+D"!DM  	ll>>t||'<'<'>G
 %%TYYTZZHF FM"==0DLt$  &  Z"  		   )SV3s7H7H7J7J#'DL	sj   D!*DD!,D4 ?D4 <E DD!DD!!D1	4EEF*F	;F	F		Fc                    V ^8  d   QhRRRR/# rB   r   )r   s   "r   r   r      s      3 $ r   c                    RV n         R# rE   )r   rG   s   &&r   rH   PeriodicExecutor.close   s     r   c                    V ^8  d   QhRRRR/# rK   r   )r   s   "r   r   r      s      M T r   c                	    V P                   e    V P                   P                  V4       R # R #   \        \        3 d     R # i ; ira   )r   rQ   r   r   rP   s   &&r   rQ   PeriodicExecutor.join   sA    <<#!!'* $ #L1 s   / AAc                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r      rT   r   c                    RV n         R# rV   rW   r3   s   &r   rX   PeriodicExecutor.wake   rZ   r   c                    V ^8  d   QhRRRR/# r\   r   )r   s   "r   r   r      r_   r   c                	    Wn         R # ra   rb   rc   s   &&r   rd    PeriodicExecutor.update_interval   rf   r   c                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r      rh   r   c                	    R V n         R# rj   rk   r3   s   &r   rl   PeriodicExecutor.skip_sleep   rn   r   c                   V ^8  d   QhRR/# )r   r'   boolr   )r   s   "r   r   r      s      d r   c                	    V P                   ;_uu_ 4        V P                  '       d   R V n         RRR4       R #  RRR4       R#   + '       g   i     R# ; iTNF)r   r   r   r3   s   &r   _should_stopPeriodicExecutor._should_stop   s7    ZZZ}}})-& Z 	 ZZZs   AAA	c                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r      s        d  r   c                	d   V P                  4       '       g    V P                  4       '       g
   R V n        R#  T P                  '       d	   RT n        M\        P                  ! 4       T P                  ,           pT P                  '       gP   \        P                  ! 4       T8  d6   \        P                  ! T P                  4       T P                  '       g   K`   RT n        K  R#   \         dA    T P                  ;_uu_ 4        R T n        R T n        RRR4       h   + '       g   i     h ; ii ; ir   )r   r   r   rs   r   r   r    rt   ru   r   rv   r   r   rw   s   & r   r>   PeriodicExecutor._run   s    ##%%
||~~$(DM & #( >>+dnn<---DNN,<x,GJJt112{{{DK- & ! ZZZ$(DM-1D*   	  Z s(   C$ C$ $D/D	D/D+&	D/)
r   r   r   r   r   r    r   r   r   r   ra   )r1   rz   r{   r|   r#   r4   r?   rH   rQ   rX   rd   rl   r   r>   r}   r   r   r   r   r   {   s<    $@Z'R&    r   r   c                    V ^8  d   QhRRRR/# )r   executorr   r'   r9   r   )r   s   "r   r   r     s      !1 d r   c                f    \         P                  ! V \        4      p\        P	                  V4       R # ra   )r   ref_on_executor_deleted
_EXECUTORSadd)r   r   s   & r   r   r     s    
++h 4
5CNN3r   c                    V ^8  d   QhRRRR/# )r   r   z'weakref.ReferenceType[PeriodicExecutor]r'   r9   r   )r   s   "r   r   r     s      E $ r   c                0    \         P                  V 4       R # ra   )r   remove)r   s   &r   r   r     s    cr   c                   V ^8  d   QhRR/# r8   r   )r   s   "r   r   r     s      T r   c                     \         f   R # \        \         4      p V  F$  pV! 4       pV'       g   K  VP                  4        K&  	  V  F%  pV! 4       pV'       g   K  VP                  ^4       K'  	  R pR # ra   )r   listrH   rQ   )	executorsr   r   s      r   _shutdown_executorsr     sd     Z I 58NN  58MM! 
 Hr   )__doc__
__future__r   rN   r   r   rt   r   typingr   r   pymongor   pymongo._asyncio_taskr   pymongo.lockr   _IS_SYNCr	   r   setr   r   r   r   r   r   r   <module>r      s_    4 "  
       - %W  W tE  E \ U

r   