
    Ch                     `    S r SSKJr   " S S5      r " S S5      r\R
                  " \5        g)z'A kernel client for in-process kernels.    )HBChannelABCc                   t   ^  \ rS rSr% Sr/ r\\   \S'   SU 4S jjr	S r
S rS rS rSS	 jrS
 rS rSrU =r$ )InProcessChannel   z#Base class for in-process channels.proxy_methodsc                 <   > [         TU ]  5         Xl        SU l        g)Initialize the channel.FN)super__init__client	_is_aliveselfr   	__class__s     oC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\ipykernel/inprocess/channels.pyr   InProcessChannel.__init__   s        c                     U R                   $ zTest if the channel is alive.r   r   s    r   is_aliveInProcessChannel.is_alive       ~~r   c                     SU l         gzStart the channel.TNr   r   s    r   startInProcessChannel.start   	    r   c                     SU l         gzStop the channel.FNr   r   s    r   stopInProcessChannel.stop    	    r   c                     Sn[        U5      e)zThis method is called in the main thread when a message arrives.

Subclasses should override this method to handle incoming messages.
z,call_handlers must be defined in a subclass.NotImplementedError)r   msgs     r   call_handlersInProcessChannel.call_handlers$   s    
 =!#&&r   c                     g)zFlush the channel.N )r   timeouts     r   flushInProcessChannel.flush,   s    r   c                 (    U R                   " U0 UD6  g)zCall the message handlers later.

The default implementation just calls the handlers immediately, but this
method exists so that GUI toolkits can defer calling the handlers until
after the event loop has run, as expected by GUI frontends.
N)r)   )r   argskwdss      r   call_handlers_later$InProcessChannel.call_handlers_later/   s     	D)D)r   c                     [         e)zProcess any pending GUI events.

This method will be never be called from a frontend without an event
loop (e.g., a terminal frontend).
r&   r   s    r   process_eventsInProcessChannel.process_events8   s
     "!r   )r   r   N)g      ?)__name__
__module____qualname____firstlineno____doc__r   listobject__annotations__r   r   r   r"   r)   r.   r3   r6   __static_attributes____classcell__r   s   @r   r   r      sA    -"$M4<$'!*" "r   r   c                   X   ^  \ rS rSrSrSrSU 4S jjrS rS rS r	S r
S	 rS
 rSrU =r$ )InProcessHBChannelA   zA dummy heartbeat channel interface for in-process kernels.

Normally we use the heartbeat to check that the kernel process is alive.
When the kernel is in-process, that doesn't make sense, but clients still
expect this interface.
g      @c                 J   > [         TU ]  5         Xl        SU l        SU l        g)r	   FTN)r
   r   r   r   _pauser   s     r   r   InProcessHBChannel.__init__K   s!    r   c                     U R                   $ r   r   r   s    r   r   InProcessHBChannel.is_aliveR   r   r   c                     SU l         gr   r   r   s    r   r   InProcessHBChannel.startV   r   r   c                     SU l         gr!   r   r   s    r   r"   InProcessHBChannel.stopZ   r$   r   c                     SU l         g)zPause the channel.TNrH   r   s    r   pauseInProcessHBChannel.pause^   s	    r   c                     SU l         g)zUnpause the channel.FNrQ   r   s    r   unpauseInProcessHBChannel.unpauseb   s	    r   c                 $    U R                   (       + $ )zTest if the channel is beating.rQ   r   s    r   
is_beatingInProcessHBChannel.is_beatingf   s    ;;r   )r   rH   r   r8   )r9   r:   r;   r<   r=   time_to_deadr   r   r   r"   rR   rU   rX   rA   rB   rC   s   @r   rE   rE   A   s7     L r   rE   N)r=   jupyter_client.channelsabcr   r   rE   registerr,   r   r   <module>r]      s4    -
 41" 1"h' 'T   ( )r   