mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 15:41:37 -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-parent-id msg)
|
||||
(jupyter-message-content msg)))
|
||||
(let ((channel (cl-find-if (lambda (c) (eq (oref c type) ctype))
|
||||
(mapcar (lambda (x) (slot-value client x))
|
||||
'(stdin-channel
|
||||
shell-channel
|
||||
iopub-channel)))))
|
||||
(let ((channel (cl-loop
|
||||
for c in '(stdin-channel
|
||||
shell-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))
|
||||
(run-with-timer 0.0001 nil #'jupyter-handle-message client channel)))
|
||||
('(quit)
|
||||
|
|
Loading…
Add table
Reference in a new issue