Skip to content

Commit

Permalink
libraries/prompter/prompter: Deprecate timeout parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Oct 31, 2022
1 parent 6bfb312 commit 9529794
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions libraries/prompter/prompter.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,11 @@ See `resolve-marks' for a reference on how `marks' are handled."
(setf (selection-actions-enabled-p source) (not (selection-actions-enabled-p source))))

(export-always 'next-ready-p)
(defun next-ready-p (prompter &optional timeout)
(defun next-ready-p (prompter)
"Block and return next PROMPTER ready source.
It's the next source that's done updating.
If all sources are done, return T.
This is unblocked when the PROMPTER is `destroy'ed.
TIMEOUT is deprecated."
(declare (ignore timeout)) ; Deprecated.
This is unblocked when the PROMPTER is `destroy'ed."
(when prompter
;; We let-bind `sync-queue' here so that it remains the same object throughout
;; this function, since the slot is subject to be changed concurrently when
Expand All @@ -456,17 +453,16 @@ TIMEOUT is deprecated."
t)))

(export-always 'all-ready-p)
(defun all-ready-p (prompter &optional timeout)
"Return non-nil when all prompter sources are ready.
After timeout has elapsed for one source, return nil."
(sera:nlet check ((next-source (next-ready-p prompter timeout)))
(defun all-ready-p (prompter)
"Return non-nil when all PROMPTER sources are ready."
(sera:nlet check ((next-source (next-ready-p prompter)))
(cond
((eq t next-source)
t)
((null next-source)
nil)
(t
(check (next-ready-p prompter timeout))))))
(check (next-ready-p prompter))))))

(export-always 'make)
(define-function make
Expand Down

0 comments on commit 9529794

Please sign in to comment.