Ensure kernel connection file is finished writing before reading from it

This commit is contained in:
Nathaniel Nicandro 2017-12-15 22:37:59 -06:00
parent ab2931beb6
commit 76de6a8b4a

View file

@ -109,6 +109,8 @@ in the jupyter runtime directory."
(shell-command-to-string "jupyter --runtime-dir")))))
(while (not (file-exists-p path))
(sleep-for 0 10))
;; FIXME: Ensure that the file is done writing
(sleep-for 1)
(let ((client (jupyter-kernel-client-from-connection-file path)))
(set-process-query-on-exit-flag proc nil)
(oset client kernel proc)