mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 23:41:38 -05:00
Process the list of channels once in jupyter--ioloop-filter
This commit is contained in:
parent
06acb2ab8c
commit
123a51b648
1 changed files with 8 additions and 5 deletions
|
@ -513,11 +513,14 @@ by `jupyter--ioloop'."
|
||||||
(jupyter-message-type msg)
|
(jupyter-message-type msg)
|
||||||
(jupyter-message-parent-id msg)
|
(jupyter-message-parent-id msg)
|
||||||
(jupyter-message-content msg)))
|
(jupyter-message-content msg)))
|
||||||
(let ((channel (cl-find-if (lambda (c) (eq (oref c type) ctype))
|
(let ((channel (cl-loop
|
||||||
(mapcar (lambda (x) (slot-value client x))
|
for c in '(stdin-channel
|
||||||
'(stdin-channel
|
shell-channel
|
||||||
shell-channel
|
iopub-channel)
|
||||||
iopub-channel)))))
|
for channel = (slot-value client c)
|
||||||
|
when (eq (oref channel type) ctype)
|
||||||
|
return channel
|
||||||
|
finally (error "No handler for channel type (%s)" ctype))))
|
||||||
(jupyter-queue-message channel (cons idents msg))
|
(jupyter-queue-message channel (cons idents msg))
|
||||||
(run-with-timer 0.0001 nil #'jupyter-handle-message client channel)))
|
(run-with-timer 0.0001 nil #'jupyter-handle-message client channel)))
|
||||||
('(quit)
|
('(quit)
|
||||||
|
|
Loading…
Add table
Reference in a new issue