branch: externals/phpinspect commit 3838e02820e7435534bdf3e4408ba7176b62981f Author: Hugo Thunnissen <de...@hugot.nl> Commit: Hugo Thunnissen <de...@hugot.nl>
Prevent worker thread from associating with the current buffer --- phpinspect-worker.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpinspect-worker.el b/phpinspect-worker.el index dae9edcb8e..553d72376f 100644 --- a/phpinspect-worker.el +++ b/phpinspect-worker.el @@ -297,7 +297,11 @@ CONTINUE must be a condition-variable" (progn (setf (phpinspect-worker-continue-running worker) t) (setf (phpinspect-worker-thread worker) - (make-thread (phpinspect-worker-make-thread-function worker)))))) + ;; Use with-temp-buffer so as to not associate thread with the + ;; current buffer. Otherwise, the buffer associated with this thread + ;; will be unkillable while the thread is running. + (with-temp-buffer + (make-thread (phpinspect-worker-make-thread-function worker))))))) (cl-defmethod phpinspect-worker-start ((worker phpinspect-dynamic-worker)) (phpinspect-worker-start (phpinspect-resolve-dynamic-worker worker)))