mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-04 15:41:37 -05:00
More reliably capture the startup message
It still sometimes isn't caught but it is more reliable. This mainly affects testing. * jupyter-client.el (jupyter-start-channels): Add a small delay after starting channels. * jupyter-kernel-manager.el (jupyter-start-kernel): Remove superfluous delay.
This commit is contained in:
parent
75abea913d
commit
5a7c083169
2 changed files with 4 additions and 3 deletions
|
@ -542,7 +542,10 @@ necessary."
|
|||
(:shell . ,shell)
|
||||
(:iopub . ,iopub)
|
||||
(:stdin . ,stdin))
|
||||
when start do (jupyter-start-channel client channel)))
|
||||
when start do (jupyter-start-channel client channel))
|
||||
;; Needed for reliability. Sometimes we are not fast enough to capture the
|
||||
;; startup message of a kernel.
|
||||
(sleep-for 0.3))
|
||||
|
||||
(cl-defmethod jupyter-stop-channels ((client jupyter-kernel-client))
|
||||
"Stop any running channels of CLIENT."
|
||||
|
|
|
@ -189,8 +189,6 @@ kernel. Starting a kernel involves the following steps:
|
|||
(let ((json-encoding-pretty-print t))
|
||||
(with-temp-file conn-file
|
||||
(insert (json-encode-plist conn-info))))
|
||||
;; This is needed for reliability
|
||||
(sleep-for 0.5)
|
||||
;; Start the process
|
||||
(let ((atime (nth 4 (file-attributes conn-file)))
|
||||
(proc (jupyter--start-kernel
|
||||
|
|
Loading…
Add table
Reference in a new issue