
    Xh.                     :    d Z ddlmZ ddlmZ dZ G d de      Zy)A thread for a control channel.    )Thread)IOLoopControlc                   "    e Zd ZdZd Zd Zd Zy)ControlThreadr   c                 z    t        j                  | fdt        i| t        d      | _        d| _        d| _        y)zInitialize the thread.nameF)make_currentTN)r   __init__CONTROL_THREAD_NAMEr   io_looppydev_do_not_traceis_pydev_daemon_thread)selfkwargss     E/var/www/html/myenv/lib/python3.12/site-packages/ipykernel/control.pyr   zControlThread.__init__   s5    A#6A&A51"&&*#    c                     t         | _        	 | j                  j                          | j                  j	                          y# | j                  j	                          w xY w)zRun the thread.N)r   r
   r   startcloser   s    r   runzControlThread.run   s?    '		!LL LL DLL s   A Ac                 b    | j                   j                  | j                   j                         y)z=Stop the thread.

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