diff options
author | jao <jao@gnu.org> | 2021-12-20 22:46:09 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-12-20 22:46:09 +0000 |
commit | 8bc53c168e72d9ec2ce9353298c3df6d0ab59a4f (patch) | |
tree | a2d8b9dd4b9d8052a6a6d0d368efcdfdeace0d6e /elisp/geiser-connection.el | |
parent | 3ff258581804c5befd5596619b7ce85480a9f233 (diff) | |
download | geiser-8bc53c168e72d9ec2ce9353298c3df6d0ab59a4f.tar.gz geiser-8bc53c168e72d9ec2ce9353298c3df6d0ab59a4f.tar.bz2 |
Asynchronous, interruptable evaluations
Diffstat (limited to 'elisp/geiser-connection.el')
-rw-r--r-- | elisp/geiser-connection.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el index 344fbe2..745aa14 100644 --- a/elisp/geiser-connection.el +++ b/elisp/geiser-connection.el @@ -254,6 +254,12 @@ (defvar geiser-connection-timeout 30000 "Time limit, in msecs, blocking on synchronous evaluation requests") +(defun geiser-con--interrupt (con) + "Interrupt any request being currently in process." + (when-let (proc (and con (geiser-con--connection-process con))) + (when (process-live-p proc) + (interrupt-process proc)))) + (defun geiser-con--send-string/wait (con str cont &optional timeout sbuf) (save-current-buffer (let ((proc (and con (geiser-con--connection-process con)))) |