+
    ‚°ñjV	  ã                   ó  € R t ^ RIt^ RIt^ RItRtRtRt]P                  t]P                  t
]P                  ! 4       t]3R R llt]3R R llt]P                  R	8H  ;'       d    ]P                   R
8  t]'       d   ]tR# ]tR# )aY  Let the event loop run while a scan thread is in a long pure-Python loop.

Without this, the event loop must win the GIL back from the scan after every socket
syscall, and a page load's requests queue behind the scan for seconds. time.sleep(0)
is not enough: the scan thread usually retakes the GIL before the loop wakes.

A thread sleeps _SLEEP after running _RUN, so it spends about a third of its time
asleep. Measured on a 41k-file first scan, that is where page loads stopped getting
faster (a shorter run bought nothing), for about 2% more scan time. All state is per
thread; nothing is shared.
Ngü©ñÒMb`?gü©ñÒMbP?g      0@c                ó(   € V ^8„  d   QhR\         RR/# ©é   ÚrunÚreturnN©Úfloat)Úformats   "Ú;C:\Ai_Coding\apps\studio\ComfyUI\app\assets\services\gil.pyÚ__annotate__r      s   € ÷ $ñ $”eð $ tñ $ó    c                óÌ   € \        4       p\        \        RR4      pVf   W,           \        n        R# W8  d   R# \	        \
        4       \        4       V ,           \        n        R# )z¢Call once per item in a hot loop on a background thread; sleeps every ``run``
seconds of work. A caller that repeats often can pass a longer window to pause less.Únext_atN)Ú_clockÚgetattrÚ_stater   Ú_sleepÚ_SLEEP)r   Únowr   s   &  r
   Ú_yield_fixedr      sF   € ô ‹(€CÜ”f˜i¨Ó.€GØ‚Ø�ŒŒÙØ
„}ÙÜ
Œ6„NÜ“X •^„F†Nr   c                ó(   € V ^8„  d   QhR\         RR/# r   r   )r	   s   "r
   r   r   +   s   € ÷ )ñ )”uð )¨ñ )r   c                ó2  € \        4       p\        \        RR4      pVf   W,           \        n        R# W8  d   R# \	        \
        4       \        4       p\        \        RW1,
          \
        ,          4      \        4      pW0V,          ,           \        n        R# )z£For a coarse sleep timer: time.sleep(_SLEEP) really takes a whole timer tick, so
scale the next run by how long the last sleep took, keeping the same share asleep.r   Ng      ð?)	r   r   r   r   r   r   ÚminÚmaxÚ
_MAX_SCALE)r   r   r   ÚafterÚscales   &    r
   Ú_yield_scaledr   +   sj   € ô ‹(€CÜ”f˜i¨Ó.€GØ‚Ø�ŒŒÙØ
„}ÙÜ
Œ6„NÜ‹H€Eô ”�C˜%�+¬Õ/Ó0´*Ó=€EØ 5�[Õ(„F†Nr   Úwin32)é   é   )Ú__doc__ÚsysÚ	threadingÚtimeÚ_RUNr   r   Úperf_counterr   Úsleepr   Úlocalr   r   r   ÚplatformÚversion_infoÚ_COARSE_SLEEPÚ	yield_gil© r   r
   Ú<module>r.      sˆ   ðñ
ó Û Û à€Ø	€à€
ð 
×	Ñ	€Ø	�‰€à	�ŠÓ	€ð #÷ $ð  $÷ )ð& —‘ Ñ'×FÐF¨C×,<Ñ,<¸wÑ,F€ç*ˆM‚	°‚	r   