From 8bc53c168e72d9ec2ce9353298c3df6d0ab59a4f Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 20 Dec 2021 22:46:09 +0000 Subject: Asynchronous, interruptable evaluations --- elisp/geiser-connection.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'elisp/geiser-connection.el') 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)))) -- cgit v1.2.3