
    jKj!                     6    d dl mZ d dlmZmZ  G d de      Zy)   )AsyncioContextBase)Context	Operationc                   8     e Zd ZeZeZ fdZd Zd Z	d Z
 xZS )AsyncioContextc                     t         |   |      }| j                  j                  |j                  | j
                         |S N)super_create_contextloop
add_readerfileno_on_read_event)selfmax_requestscontext	__class__s      g/Users/ahmed/devFolder/Ultron/claude-voice/.venv/lib/python3.12/site-packages/caio/linux_aio_asyncio.pyr   zAsyncioContext._create_context	   s5    '),7		W^^T-@-@A    c                 H    |j                         ry|j                  d       y)zg
        Allow to set result directly.
        Cause process_events running in the same thread
        NT)done
set_result)r   futureresults      r   _on_donezAsyncioContext._on_done   s    
 ;;=$r   c                 b    | j                   j                  | j                  j                         y r	   )r   remove_readerr   r   r   s    r   _destroy_contextzAsyncioContext._destroy_context   s    		 3 34r   c                 l    | j                   j                          | j                   j                          y r	   )r   pollprocess_eventsr   s    r   r   zAsyncioContext._on_read_event   s"    ##%r   )__name__
__module____qualname__r   OPERATION_CLASSr   CONTEXT_CLASSr   r   r   r   __classcell__)r   s   @r   r   r      s!    OM
 5&r   r   N)asyncio_baser   	linux_aior   r   r    r   r   <module>r,      s    , )&' &r   