Open Yevgnen opened 5 years ago
It may be possible. I don't know what would happen if you made it asynchronous and tried to send requests before the restart is complete. The restarting functions like jupyter-repl-restart-kernel
would have to have a callback function that it evaluates once the kernel is restarted. You would also have to have the jupyter-org-restart-kernel-*
functions and any other functions that call restarting functions take into account the asynchronous behavior.
the server
Are you referring to a notebook kernel server? Or just a kernel process? If you are talking about a notebook server, I don't think jupyter-repl-restart-kernel
currently handles restarting a notebook kernel properly (which I will fix).
Even if it did, in addition to passing jupyter-repl-restart-kernel
a callback function you would probably have to modify jupyter-api-restart-kernel
to take a callback function.
If you are willing to implement this, I'd be happy to assist by answering any questions that may come up.
the server
Sorry, maybe I should say the kernel process
.
Starting python3 kernel process...done
Requesting kernel info...done
Restarting kernel...
Starting python3 kernel process...done
I don't think
jupyter-repl-restart-kernel
currently handles restarting a notebook kernel properly (which I will fix).
Should be fixed by 39974d184188966fd0c948a25320209c9de74af6.
When I run commands like
jupyter-org-restart-kernel-*
, the server often take some time (seconds) to finish restarting and Emacs hangs, it is possible to make this action asynchronous?