+
    "Ý³jq#  ã                  ó°  a € 0 t $ 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	&   ^tR
]R&   ]P*                  ! 4       tRsR]R&   RsR]R&   RsR]R&   R R ltR R ltR R lt]! 4       ;'       d(    ]! ]R4      ;'       d    ]P<                  ! 4       '       * sR]R&   Rs R]R&   \>        \@        3s!R]R&   Rs"R]R&   R  R! lt#R" R# lt$R$ R% lt%R?R& R' llt&]R?R( R) ll4       t'R*R/R+ R, llt(R*RR-R./R/ R0 llt)R1R2/R3 R4 llt*R5 R6 lt+R7RR8R/R9 R: llt,R; R< lt-R= R> lt.]P^                  ! ]*4       . R@Ot0R# )Az>Shared thread-pool management for the high-level PCRE helpers.)ÚannotationsN)ÚCallableÚIterator)ÚThreadPoolExecutor)Úcontextmanager)ÚFinalzpcre-workerz
Final[str]Ú
_POOL_NAMEz
Final[int]Ú_MIN_CORES_FOR_THREADSzThreadPoolExecutor | NoneÚ_THREAD_POOLú
int | NoneÚ_THREAD_POOL_WORKERSÚ_PERFORMANCE_CPU_TOTALc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚint© )Úformats   "ÚM/home/luca/screen-checking/.venv/lib/python3.14/site-packages/pcre/threads.pyÚ__annotate__r      s   € ÷ ñ �Cñ ó    c                 ó@   € \         P                  ! 4       ;'       g    ^# ©é   )ÚosÚ	cpu_countr   r   r   Ú
_cpu_totalr      s   € Ü�<Š<‹>×Ð˜QÐr   c               ó   € V ^8„  d   QhRR/# ©r   r   Úboolr   )r   s   "r   r   r       s   € ÷ 2ñ 2˜Tñ 2r   c                 ó$   € \        4       \        8¬  # )z?Report whether the threaded backend is allowed on this machine.)r   r	   r   r   r   Úthreading_supportedr"       s   € ô ‹<Ô1Ñ1Ð1r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   &   s   € ÷ ñ  ñ r   c                 óH  € \         p V e   V # \        P                  R8w  d   ^ pVs V#  \        P                  ! . ROR\        P
                  R7      p\        ^ \        VP                  4       4      4      pVs V#   \        \        \        P                  3 d	    ^ p Ts T# i ; i)zFReturn macOS performance-tier logical CPUs when the kernel exposes it.ÚdarwinT)ÚtextÚstderr)Úsysctlz-nzhw.perflevel0.logicalcpu)r   ÚsysÚplatformÚ
subprocessÚcheck_outputÚDEVNULLÚmaxr   ÚstripÚOSErrorÚ
ValueErrorÚCalledProcessError)ÚsnapshotÚresultÚvalues      r   Ú_performance_cpu_totalr6   &   s¬   € ô &€HØÒØˆô ‡|�|�xÔØˆð $ÐØ€Mð	Ü×+Ò+Ú<ØÜ!×)Ñ)ôˆEô
 ˜œC §¡£Ó.Ó/ˆFð $ÐØ€Møô œ¤Z×%BÑ%BÐCô 	Ø‰FØ#ÐØ€Mð	ús   ©AA9 Á9"B!Â B!Ú_is_gil_enabledr    Ú_THREADS_DEFAULTi`ê  r   Ú_THREAD_AUTO_THRESHOLDztuple[bool, int]Ú_THREAD_CONFIGÚ_THREAD_POOL_CONFIGc               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   K   s   € ÷ "ñ "�cñ "r   c                 ó†   € \        4       '       g   ^ # \        4       p \        4       pV^ 8”  d   V# \        ^V ^,          4      # ©é    )r"   r   r6   r.   )Ú	cpu_totalÚperformance_totals     r   Ú_max_threadsrB   K   s=   € Ü× Ò ÙÜ“€IÜ.Ó0ÐØ˜1ÔØ Ð Üˆq�)˜q•.Ó!Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r   r5   r   r   r   r   )r   s   "r   r   r   U   s   € ÷ ñ  :ð °#ñ r   c                óà   € \        4       pV^ 8X  d   \        R4      hV f   V#  \        V 4      pT^ 8:  d   \	        R4      hY!8”  d   TpT#   \        \        3 d   p\        R4      ThRp?ii ; i)r?   zGThreaded backend requires at least 8 CPU cores; refusing to create poolNz"max_workers must be an int or Nonezmax_workers must be >= 1)rB   ÚRuntimeErrorr   Ú	TypeErrorr1   )r5   ÚmaximumÚresolvedÚexcs   &   r   Ú_determine_worker_countrJ   U   s‡   € Ü‹n€GØ�!„|ÜØUó
ð 	
ð ‚}ØˆðGÜ�u“:ˆð �1„}ÜÐ3Ó4Ð4àÔØˆØ€Oøô ”zÐ"ô GÜÐ<Ó=À3ÐFûðGús   ¤A ÁA-ÁA(Á(A-c               ó    € V ^8„  d   QhRRRR/# )r   Útargetr   r   z4tuple[ThreadPoolExecutor, ThreadPoolExecutor | None]r   )r   s   "r   r   r   k   s   € ÷ "ñ "Øð"à9ñ"r   c                ó‚   € \         e   \        V 8X  d   V s\         R3# \         p\        V \        R7      s V sV s\         V3# )z?Return a pool for *target* while holding ``_THREAD_POOL_LOCK``.N)Úmax_workersÚthread_name_prefix)r
   r   r;   r   r   )rL   Úold_pools   & r   Ú_pool_for_target_lockedrQ   k   sQ   € ô ÒÔ$8¸FÔ$BØ$ÐÜ˜TÐ!Ð!ä€HÜ%ØÜ%ô€Lð "ÐØ ÐÜ˜Ð!Ð!r   c               ó    € V ^8„  d   QhRRRR/# )r   rN   r   r   r   r   )r   s   "r   r   r   ‚   s   € ÷ ñ  Jð Ð:Lñ r   c                óÞ   € \        4        \        ;_uu_ 4        \        V e   T M\        4      p\	        V4      w  r#RRR4       Xe   VP                  RR7       X#   + '       g   i     L(; i)z@Return the shared executor, creating or resizing it if required.NT©Úwait©r6   Ú_THREAD_POOL_LOCKrJ   r   rQ   Úshutdown)rN   rL   ÚpoolrP   s   &   r   Úensure_thread_poolrZ   ‚   s_   € ô Ôß	Ö	Ü(Ø&Ò2‰KÔ8Ló
ˆô 1°Ó8‰ˆ÷	 
ð ÒØ×Ñ˜tÐÔ$Ø€K÷ 
×	ús   ™#AÁA,	c               ó    € V ^8„  d   QhRRRR/# )r   rN   r   r   z(Iterator[tuple[ThreadPoolExecutor, int]]r   )r   s   "r   r   r   ˜   s   € ÷ )ñ )Øð)à-ñ)r   c              #  ó2  "  € Rp\        4         \        ;_uu_ 4        \        V e   T M\        4      p\	        V4      w  r1W23x € RRR4       Ve   VP                  RR7       R# R#   + '       g   i     L*; i  Te   TP                  RR7       i i ; i5i)ap  Lease the pool state while a caller submits a batch of work.

The lease is deliberately limited to executor acquisition and submission.
Waiting for futures while holding the lock could deadlock if user work
re-enters pool configuration.  Reconfiguration cannot shut down the leased
executor until the context exits, so every submission is accepted by a live
executor.
NTrT   rV   )rN   rP   rL   rY   s   &   r   Ú_thread_pool_submissionr]   —   s’   é € ð +/€HÜÔð	)ßÖÜ,Ø*Ò6‘Ô<PóˆFô 5°VÓ<‰NˆDØ�,Ò÷ ð ÒØ×Ñ 4ÐÖ(ñ  ÷ ×ûð ÒØ×Ñ 4ÐÕ(ð  üs3   ‚B�A; ž(A(ÁA; ÁBÁ(A8	Á3A; Á;BÂBrN   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Útaskszlist[Callable[[], object]]rN   r   r   ztuple[list[object], int]r   )r   s   "r   r   r   ²   s$   € ÷ ñ Ø%ðØ7Aðàñr   c               ó¸   € \        V4      ;_uu_ 4       w  r#V  Uu. uF  qBP                  V4      NK  	  ppRRR4       WS3# u upi   + '       g   i     XX3# ; i)z;Submit *tasks* atomically with respect to pool replacement.N)r]   Úsubmit)r_   rN   rY   ÚworkersÚtaskÚfuturess   &$    r   Úsubmit_thread_pool_tasksre   ²   sU   € ô
 
! ×	-Ô	-±°$Ù16Ó7±¨—;‘;˜tÖ$±ˆÐ7÷ 
.àÐÐùò 8÷ 
.Ö	-à�GÐÐús   ”A›A´AÁAÁA	ÚpreloadFc               ó$   € V ^8„  d   QhRRRRRR/# )r   rN   r   rf   r    r   r   r   )r   s   "r   r   r   ¼   s$   € ÷ ñ ØðØ04ðàñr   c                óÚ   € \        V 4      p\        ;_uu_ 4        VsVs\        pRsRRR4       Xe   VP                  RR7       V'       d   \        V4       V#   + '       g   i     L;; i)zzSet the shared executor size used by :func:`parallel_map`.

Returns the effective worker count after applying the update.
NTrT   )rJ   rW   r   r;   r
   rX   rZ   )rN   rf   rb   rY   s   $$  r   Úconfigure_thread_poolri   ¼   s^   € ô & kÓ2€Gç	Ö	Ø&ÐØ%ÐÜˆØˆ÷	 
ð ÒØ�‰˜4ˆÔ çÜ˜7Ô#à€N÷ 
×	ús   šAÁA*	rU   Tc               ó    € V ^8„  d   QhRRRR/# )r   rU   r    r   ÚNoner   )r   s   "r   r   r   Ù   s   € ÷ 
!ñ 
! $ð 
!°$ñ 
!r   c                óš   € \         ;_uu_ 4        \        pRsRRR4       Xe   VP                  V R7       R# R#   + '       g   i     L*; i)z9Dispose of the shared thread pool if it has been created.NrT   )rW   r
   rX   )rU   rY   s   $ r   Úshutdown_thread_poolrm   Ù   s=   € ÷
 
Ö	ÜˆØˆ÷ 
ð ÒØ�‰˜4ˆÖ ñ ÷	 
×	ús	   �	:ºA
	c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   æ   s   € ÷ $ñ $˜cñ $r   c                 óÜ   € \         p V e   V \        8X  d   V # \        4        \        ;_uu_ 4        \        f   \	        R4      s\        s \        uuRRR4       #   + '       g   i     R# ; i)zIReturn the current configured worker count (creating defaults if needed).N)r;   r   r6   rW   rJ   )r3   s    r   Úget_thread_pool_sizerp   æ   sQ   € ô #€HØÒ Ô,@Ô @ØˆäÔß	Ö	ÜÒ'Ü#:¸4Ó#@Ð Ü2ÐÜ#÷	 
×	×	Ó	ús   °AÁA+	ÚenabledÚ	thresholdc               ó$   € V ^8„  d   QhRRRRRR/# )r   rq   zbool | Nonerr   r   r   r    r   )r   s   "r   r   r   ö   s$   € ÷ ñ ØðØ/9ðà	ñr   c                ó2  € \         ;_uu_ 4        V f   \        M
\        V 4      p\        pVe    \	        V4      pT^ 8  d   \        R4      hVsVsW#3sVuuRRR4       #   \
        \        3 d   p\        R4      ThRp?ii ; i  + '       g   i     R# ; i)z;Adjust the global threading defaults and/or auto threshold.Nzthreshold must be an intzthreshold must be >= 0)rW   r8   r    r9   r   rF   r1   r:   )rq   rr   Únew_enabledÚnew_thresholdrI   s   $$   r   Úconfigure_threadsrw   ö   sœ   € ÷ 
Ö	Ø*1ª/Õ&¼tÀG»}ˆÜ.ˆàÒ ðEÜ # I£�ð ˜qÔ Ü Ð!9Ó:Ð:à&ÐØ!.ÐØ%Ð5ˆØ÷ 
Ò	øô œzÐ*ô EÜÐ :Ó;ÀÐDûðEú÷ 
×	Ð	ús-   � B°A »BÁ BÁ1A=Á=BÂBÂB	c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r     s   € ÷ ñ ˜Dñ r   c                 ó   € \         ^ ,          # r>   ©r:   r   r   r   Úget_thread_defaultr{     ó   € Ü˜!ÕÐr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r     s   € ÷ ñ ˜Cñ r   c                 ó   € \         ^,          # r   rz   r   r   r   Úget_auto_thresholdr     r|   r   )N)	ri   rw   rZ   r   r{   rp   rm   re   r"   )1Ú__conditional_annotations__Ú__doc__Ú
__future__r   Úatexitr   r+   r)   Ú	threadingÚcollections.abcr   r   Úconcurrent.futuresr   Ú
contextlibr   Útypingr   r   Ú__annotations__r	   ÚRLockrW   r
   r   r   r   r"   r6   Úhasattrr7   r8   r9   r:   r;   rB   rJ   rQ   rZ   r]   re   ri   rm   rp   rw   r{   r   ÚregisterÚ__all__)r€   s   @r   Ú<module>rŽ      st  øðô Eå "ã Û 	Û Û 
Û ß .Ý 1Ý %Ý à&€
ˆJÓ &Ø%&Ð ˜
Ó &Ø—O’OÓ%Ð Ø*.€Ð'Ó .Ø#'Ð �jÓ 'Ø%)Ð ˜
Ó )õõ2õñ4 -Ó.÷ ð ÙˆCÐ"Ó#×=Ð=¨×(;Ò(;Ó(=ô4Ð �$ó ð %Ð ˜Ó $ô %5Ô6LÐ#M€Ð Ó MØ"&Ð �ZÓ &õ"õõ,"÷.ð* ö)ó ð)ð4ØDH÷ðØ!%ðØ7<÷ð:
!¨÷ 
!õ$ð Ø"ðØ<@÷õ2õð ‡‚Ð$Ô %ò
‚r   