a
    ©ˆc?  ã                   @   s,   d Z ddlZddlZG dd„ dejjƒZdS )z‹
A simple ping-pong style heartbeat that runs in a thread.

Modified from upstream to enable the heartbeat thread to be shut down cleanly.
é    Nc                       s    e Zd ZdZ‡ fdd„Z‡  ZS )Ú	Heartbeatz�
    A simple ping-pong style heartbeat that runs in a thread.

    Modified from upstream to enable the thread to be shut down cleanly.
    c              
      sR   zt ƒ  ¡  W n> tjyL } z$| j ¡  |jtjkr8‚ W Y d }~n
d }~0 0 d S )N)ÚsuperÚrunÚzmqZZMQErrorÚsocketÚcloseÚerrnoZETERM)ÚselfÚe©Ú	__class__© úl/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/envisage/plugins/ipython_kernel/heartbeat.pyr   +   s    
zHeartbeat.run)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__classcell__r   r   r   r   r   $   s   r   )r   Zipykernel.heartbeatZ	ipykernelr   Z	heartbeatr   r   r   r   r   Ú<module>
   s   