@@ -181,26 +181,26 @@ function kernel_info_request(socket, kernel, msg)
181181 send_ipython (socket, kernel,
182182 msg_reply (msg, " kernel_info_reply" ,
183183 Dict (" protocol_version" => " 5.4" ,
184- " implementation" => " ijulia" ,
185- " implementation_version" => string (pkgversion (@__MODULE__ )),
186- " language_info" =>
187- Dict (" name" => " julia" ,
188- " version" =>
184+ " implementation" => " ijulia" ,
185+ " implementation_version" => string (pkgversion (@__MODULE__ )),
186+ " language_info" =>
187+ Dict (" name" => " julia" ,
188+ " version" =>
189189 string (VERSION . major, ' .' ,
190190 VERSION . minor, ' .' ,
191191 VERSION . patch),
192- " mimetype" => " application/julia" ,
193- " file_extension" => " .jl" ),
194- " banner" => " Julia: A fresh approach to technical computing." ,
195- " help_links" => [
196- Dict (" text" => " Julia Home Page" ,
197- " url" => " http://julialang.org/" ),
198- Dict (" text" => " Julia Documentation" ,
199- " url" => " http://docs.julialang.org/" ),
200- Dict (" text" => " Julia Packages" ,
201- " url" => " https://juliahub.com/ui/Packages" )
202- ],
203- " status" => " ok" )))
192+ " mimetype" => " application/julia" ,
193+ " file_extension" => " .jl" ),
194+ " banner" => " Julia: A fresh approach to technical computing." ,
195+ " help_links" => [
196+ Dict (" text" => " Julia Home Page" ,
197+ " url" => " http://julialang.org/" ),
198+ Dict (" text" => " Julia Documentation" ,
199+ " url" => " http://docs.julialang.org/" ),
200+ Dict (" text" => " Julia Packages" ,
201+ " url" => " https://juliahub.com/ui/Packages" )
202+ ],
203+ " status" => " ok" )))
204204end
205205
206206"""
@@ -226,23 +226,11 @@ request](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-s
226226sending the reply this will exit the process.
227227"""
228228function shutdown_request (socket, kernel, msg)
229- # stop heartbeat thread
230- stop_heartbeat (kernel)
231-
232- # Shutdown the `requests` socket handler before sending any messages. This
233- # is necessary because otherwise the event loop will be calling
234- # `recv_ipython()` and holding a lock on `requests`, which will cause a
235- # deadlock when we try to send a message to it from the `control` socket
236- # handler.
237- IJulia. _shutting_down[] = true
238- @async Base. throwto (kernel. requests_task[], InterruptException ())
239-
240- # In protocol 5.4 the shutdown reply moved to the control socket
241- shutdown_socket = VersionNumber (msg) >= v " 5.4" ? kernel. control[] : kernel. requests[]
242- send_ipython (shutdown_socket, kernel,
229+ send_ipython (kernel. control[], kernel,
243230 msg_reply (msg, " shutdown_reply" , msg. content))
244231 sleep (0.1 ) # short delay (like in ipykernel), to hopefully ensure shutdown_reply is sent
245- kernel. shutdown ()
232+
233+ kernel. shutdown (kernel)
246234
247235 nothing
248236end
0 commit comments