From 823cd956285308b3565d366e7edb51542299822b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 3 Feb 2025 09:55:57 +0100 Subject: [PATCH] Guard against the remove message not working --- knots/resource-pool.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/knots/resource-pool.scm b/knots/resource-pool.scm index 17919a6..ac536cc 100644 --- a/knots/resource-pool.scm +++ b/knots/resource-pool.scm @@ -341,7 +341,14 @@ start (cdr end)))) - (loop (remove-at-index! resources index) + (loop (if index + (remove-at-index! resources index) + (begin + (simple-format + (current-error-port) + "resource pool error: unable to remove ~A\n" + resource) + resources)) available ; resource shouldn't be in this list waiters (remove-at-index!