Function: dape--threads-set-status
dape--threads-set-status is a natively compiled function defined in
dape.el.
Signature
(dape--threads-set-status CONN THREAD-ID ALL-THREADS STATUS &optional UPDATE-HANDLE)
Documentation
Set string STATUS thread(s) for CONN.
If THREAD-ID is non-nil set status for thread with :id equal to
THREAD-ID to STATUS.
If ALL-THREADS is non-nil set status of all all threads to STATUS.
Ignore status update if UPDATE-HANDLE is not the last handle created
by dape--threads-make-update-handle.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--threads-set-status ( conn thread-id all-threads status
&optional update-handle)
"Set string STATUS thread(s) for CONN.
If THREAD-ID is non-nil set status for thread with :id equal to
THREAD-ID to STATUS.
If ALL-THREADS is non-nil set status of all all threads to STATUS.
Ignore status update if UPDATE-HANDLE is not the last handle created
by `dape--threads-make-update-handle'."
(unless update-handle
(setq update-handle (dape--threads-make-update-handle conn)))
(when (> update-handle (dape--threads-last-update-handle conn))
(setf (dape--threads-last-update-handle conn) update-handle)
(let* ((threads (dape--threads conn))
(thread (cl-find thread-id threads
:key (lambda (th) (plist-get th :id)))))
(unless thread
(setf (dape--threads conn)
(nconc threads
`(( :id ,thread-id
:name ,(format "thread-%s" thread-id)
:status ,status)))))
(cond (;; Set status on all threads
all-threads
(cl-loop for th in threads
do (plist-put th :status status)))
(;; Set status only on specified thread
thread (plist-put thread :status status))))))