jupyter-repl-ret: Don't block the status handler while waiting for an is-complete-reply

This commit is contained in:
Nathaniel Nicandro 2018-10-17 22:35:47 -05:00
parent 5395d4d44a
commit 66c3fc4eb7

View file

@ -1488,12 +1488,12 @@ execute the current cell."
(error "Kernel busy")) (error "Kernel busy"))
(if force (jupyter-send-execute-request jupyter-current-client) (if force (jupyter-send-execute-request jupyter-current-client)
(if (not jupyter-repl-use-builtin-is-complete) (if (not jupyter-repl-use-builtin-is-complete)
(let* ((jupyter-inhibit-handlers '(:status)) (let ((res (jupyter-wait-until-received :is-complete-reply
(res (jupyter-wait-until-received :is-complete-reply (let ((jupyter-inhibit-handlers '(:status)))
(jupyter-send-is-complete-request (jupyter-send-is-complete-request
jupyter-current-client jupyter-current-client
:code (jupyter-repl-cell-code)) :code (jupyter-repl-cell-code)))
jupyter-repl-maximum-is-complete-timeout))) jupyter-repl-maximum-is-complete-timeout)))
(unless res (unless res
(message "Kernel did not respond to is-complete-request, using built-in is-complete. (message "Kernel did not respond to is-complete-request, using built-in is-complete.
Reset `jupyter-repl-use-builtin-is-complete' to nil if this is only temporary.") Reset `jupyter-repl-use-builtin-is-complete' to nil if this is only temporary.")