From 44a8b67f3bd63526f9930ccfd44c5db8240a4968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Fri, 21 Oct 2022 23:41:00 +0300 Subject: [PATCH] libraries/prompter/prompter: Simplify next-ready-p. --- libraries/prompter/prompter.lisp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/libraries/prompter/prompter.lisp b/libraries/prompter/prompter.lisp index 827685c4ce48..77e4760c3aec 100644 --- a/libraries/prompter/prompter.lisp +++ b/libraries/prompter/prompter.lisp @@ -436,19 +436,18 @@ This is unblocked when the PROMPTER is `destroy'ed." (if (= (length (ready-sources sync-queue)) (length (sources prompter))) t - (progn - (calispel:fair-alt - ((calispel:? (ready-channel sync-queue) next-source) - (cond - ((null next-source) - nil) - (t - (push next-source (ready-sources sync-queue)) - ;; Update selection when update is done - (select-first prompter) - next-source))) - ((calispel:? (sync-interrupt-channel sync-queue)) - nil)))) + (calispel:fair-alt + ((calispel:? (ready-channel sync-queue) next-source) + (cond + ((null next-source) + nil) + (t + (push next-source (ready-sources sync-queue)) + ;; Update selection when update is done: + (select-first prompter) + next-source))) + ((calispel:? (sync-interrupt-channel sync-queue)) + nil))) ;; No sync-queue if no input was ever set. t)))