Thanks for the review and advice, Maxime! According to the original semantics, I think I should keep (1- (current-processor-count)) rather than just (current-processor-count).
Attached updated patch. Best regards. On Thu, Aug 14, 2025 at 10:59 PM Maxime Devos <maximede...@telenet.be> wrote: > Processor count can change over time. So, current-processor-count needs > to be called only once (or there needs to be proper support for adapting > to the changing count). It's current-processor-count, not > fixed-processor-count, even if in most cases it doesn't change. > > Also: > > (max 1 (current-processor-count)) > > Best regards, > Maxime Devos > >
From 5fb6aabb086f5631ca925498fb540f82aaa819bc Mon Sep 17 00:00:00 2001 From: Nala Ginrut <mu...@gnu.org> Date: Thu, 14 Aug 2025 21:37:42 +0900 Subject: [PATCH] Fix futures, %worker-count shouldn't be zero to prevent halting --- module/ice-9/futures.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ice-9/futures.scm b/module/ice-9/futures.scm index 4a462839a..b6dcd45df 100644 --- a/module/ice-9/futures.scm +++ b/module/ice-9/futures.scm @@ -264,7 +264,7 @@ adding it to the waiter queue." (define %worker-count (if (provided? 'threads) - (- (current-processor-count) 1) + (max 1 (1- (current-processor-count))) 0)) ;; A dock of workers that stay here forever. -- 2.43.0