
    :gi                       S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSKJr  SSKJr  Sr	Sr
 SSKrS	r	S
SKJr  S
SKJr  S
SKJr  S
SKJr  S
SKJr  S
SKJr  S
SKJr  \" S5      r " S S5      r\R2                  (       d$  \	(       d  S rS rS rS rS rS rS rS rS rggg! \ a  r\" \5      r
 SrCN[SrCff = f)z&asyncio-related concurrency functions.    )annotationsN)Any)Callable)	Coroutine)TypeVarFT   )
await_only)await_fallback)in_greenlet)greenlet_spawn)is_exit_exception)AsyncAdaptedLock)_Runner_Tc                  `    \ rS rSrSrS	S jr        S
S jr        SS jrS	S jrSr	g)
_AsyncUtil(   z&Asyncio util for test suite/ util onlyc                :    [         (       a  [        5       U l        g g N)have_greenletr   runnerselfs    R/var/www/html/hfs/venv/lib/python3.13/site-packages/sqlalchemy/util/concurrency.py__init___AsyncUtil.__init__+   s    =!)DK     c                D    U R                   R                  U" U0 UD65      $ )zRun coroutine on the loop)r   runr   fnargskwargss       r   r   _AsyncUtil.run/   s!     {{r426233r   c                    [         (       a]  U R                  R                  5       R                  5       (       a  U" U0 UD6$ U R                  R	                  [        U/UQ70 UD65      $ U" U0 UD6$ )z3Run sync function in greenlet. Support nested calls)r   r   get_loop
is_runningr   r   r    s       r   run_in_greenlet_AsyncUtil.run_in_greenlet8   sg     ={{##%00224*6**{{~b'J4'J6'JKKt&v&&r   c                P    [         (       a  U R                  R                  5         g g r   )r   r   closer   s    r   r+   _AsyncUtil.closeD   s    =KK r   )r   N)returnNone)r!   z&Callable[..., Coroutine[Any, Any, _T]]r"   r   r#   r   r-   r   )r!   zCallable[..., _T]r"   r   r#   r   r-   r   )
__name__
__module____qualname____firstlineno____doc__r   r   r(   r+   __static_attributes__ r   r   r   r   (   s_    0$424 4 	4
 
4
'#
',/
';>
'	
' r   r   c                 `    [         (       a  g [        [        (       a  S[        -  5      eS5      e)Nz9the greenlet library is required to use this function. %s )r   
ValueErrorgreenlet_errorr5   r   r   _not_implementedr:   K   s<     = ~"#
 	
 	
 	
r   c                ,    [        U [        5      (       + $ r   )
isinstance	Exception)es    r   r   r   X   s    a+++r   c                    [        5         g r   r:   things    r   r	   r	   [       r   c                    U $ r   r5   rA   s    r   r
   r
   ^   s    r   c                     [        5         g r   r@   r5   r   r   r   r   a   rC   r   c                    [        5         g r   r@   )r!   r"   kws      r   r   r   d   rC   r   c                     [        5         g r   r@   )r"   rG   s     r   r   r   g   rC   r   c                    U " U0 UD6$ r   r5   r!   argrG   s      r   _util_async_runrL   j   s    3~"~r   c                    [        5         g r   r@   rJ   s      r   "_util_async_run_coroutine_functionrN   m   rC   r   )r3   
__future__r   asynciotypingr   r   r   r   r   r9   greenlet_concurrency_py3kr	   r
   r   r   r   r   r   ImportErrorr>   strr   r   TYPE_CHECKINGr:   rL   rN   r5   r   r   <module>rW      s    - "      +
 M;C=CIG*T]   B M
,I %2c  	VN	s   B& &B>,B99B>