File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -723,12 +723,18 @@ def send_with_metadata(
723
723
724
724
kernel_kwargs = {}
725
725
if ipykernel .version_info >= (6 ,):
726
- kernel_kwargs ["control_thread" ] = ControlThread (daemon = True )
726
+ kernel_kwargs ["control_thread" ] = control_thread = ControlThread (
727
+ daemon = True
728
+ )
727
729
if ipykernel .version_info >= (7 ,):
728
730
kernel_kwargs ["shell_socket" ] = zmq .asyncio .Socket (shell_socket )
729
731
kernel_kwargs ["control_socket" ] = zmq .asyncio .Socket (control_socket )
730
732
else :
731
- kernel_kwargs ["control_stream" ] = zmqstream .ZMQStream (control_socket )
733
+ # Kernel.start starts control thread in kernel 7
734
+ control_thread .start ()
735
+ kernel_kwargs ["control_stream" ] = zmqstream .ZMQStream (
736
+ control_socket , control_thread .io_loop
737
+ )
732
738
733
739
kernel_kwargs ["shell_streams" ] = [zmqstream .ZMQStream (shell_socket )]
734
740
You can’t perform that action at this time.
0 commit comments