
    Mh.                     B    d Z ddlmZ ddlmZ dZ G d de          ZdS )A thread for a control channel.    )Thread)IOLoopControlc                   $    e Zd ZdZd Zd Zd ZdS )ControlThreadr   c                 ~    t          j        | fdt          i| t          d          | _        d| _        d| _        dS )zInitialize the thread.nameF)make_currentTN)r   __init__CONTROL_THREAD_NAMEr   io_looppydev_do_not_traceis_pydev_daemon_thread)selfkwargss     Q/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/ipykernel/control.pyr   zControlThread.__init__   sH    AA#6A&AAA5111"&&*###    c                     t           | _        	 | j                                         | j                                         dS # | j                                         w xY w)zRun the thread.N)r   r
   r   startcloser   s    r   runzControlThread.run   sV    '		!L   L     DL    s   A Ac                 N    | j                             | j         j                   dS )z=Stop the thread.

        This method is threadsafe.
        N)r   add_callbackstopr   s    r   r   zControlThread.stop   s%    
 	!!$,"344444r   N)__name__
__module____qualname____doc__r   r   r    r   r   r   r   	   sG        ))+ + +! ! !5 5 5 5 5r   r   N)r    	threadingr   tornado.ioloopr   r   r   r!   r   r   <module>r$      si    % %       ! ! ! ! ! ! 5 5 5 5 5F 5 5 5 5 5r   