Function: nrepl--mark-id-completed
nrepl--mark-id-completed is a byte-compiled function defined in
nrepl-client.el.
Signature
(nrepl--mark-id-completed ID)
Documentation
Move ID from nrepl-pending-requests to nrepl-completed-requests.
The completed table is bounded by nrepl-completed-requests-max-size;
when the cap is reached the oldest entry is evicted FIFO.
It is safe to call this function multiple times on the same ID -- the
second call is a no-op because the entry has already been moved out of
nrepl-pending-requests.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/nrepl-client.el
(defun nrepl--mark-id-completed (id)
"Move ID from `nrepl-pending-requests' to `nrepl-completed-requests'.
The completed table is bounded by `nrepl-completed-requests-max-size';
when the cap is reached the oldest entry is evicted FIFO.
It is safe to call this function multiple times on the same ID -- the
second call is a no-op because the entry has already been moved out of
`nrepl-pending-requests'."
(when-let* ((handler (gethash id nrepl-pending-requests)))
(puthash id handler nrepl-completed-requests)
(remhash id nrepl-pending-requests)
(when nrepl--completed-requests-order
(queue-enqueue nrepl--completed-requests-order id)
(when (and (> nrepl-completed-requests-max-size 0)
(> (queue-length nrepl--completed-requests-order)
nrepl-completed-requests-max-size))
(remhash (queue-dequeue nrepl--completed-requests-order)
nrepl-completed-requests)))))