Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
guix-hpc
guix-kernel
Commits
3b418494
Commit
3b418494
authored
Jul 18, 2019
by
Ludovic Courtès
Browse files
kernels: Add 'kernel-sockets'.
* jupyter/kernels.scm (kernel-sockets): New procedure. (close-kernel): Use it.
parent
6874b76c
Changes
1
Hide whitespace changes
Inline
Side-by-side
jupyter/kernels.scm
View file @
3b418494
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
kernel-heartbeat
kernel-heartbeat
kernel-iosub
kernel-iosub
kernel-iopub
;alias
kernel-iopub
;alias
kernel-sockets
read-message
read-message
send-message
send-message
...
@@ -82,14 +83,19 @@
...
@@ -82,14 +83,19 @@
(
%kernel
name
pid
key
(
%kernel
name
pid
key
control
shell
standard-input
heartbeat
iosub
))
control
shell
standard-input
heartbeat
iosub
))
(
define
(
kernel-sockets
kernel
)
"Return all the ZeroMQ sockets associated with KERNEL."
(
map
(
lambda
(
socket
)
(
socket
kernel
))
(
list
kernel-shell
kernel-control
kernel-standard-input
kernel-heartbeat
kernel-iopub
)))
(
define
(
close-kernel
kernel
)
(
define
(
close-kernel
kernel
)
"Close all the open connections of KERNEL."
"Close all the open connections of KERNEL."
(
for-each
zmq-close-socket
(
for-each
zmq-close-socket
(
kernel-sockets
kernel
)))
(
map
(
lambda
(
proc
)
(
proc
kernel
))
(
list
kernel-control
kernel-shell
kernel-standard-input
kernel-heartbeat
kernel-iopub
))))
(
define
(
jupyter-kernel-path
)
(
define
(
jupyter-kernel-path
)
"Return the default search path for Jupyter kernels."
"Return the default search path for Jupyter kernels."
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment