From 1fd36f79e68200d9b04cd8d4e8340e326ace7af8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 19 Oct 2023 12:03:47 +0200 Subject: [PATCH] Add better default for default scheduler parallelism parameter --- src/promesa/exec.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/promesa/exec.cljc b/src/promesa/exec.cljc index b84cd12..40e8092 100644 --- a/src/promesa/exec.cljc +++ b/src/promesa/exec.cljc @@ -86,7 +86,8 @@ ^{:doc "Default scheduled executor instance."} default-scheduler (delay - #?(:clj (scheduled-executor :parallelism (get-available-processors)) + #?(:clj (scheduled-executor :parallelism (min (int (* (get-available-processors) 0.2)) 2) + :thread-factory {:prefix "promesa/default-scheduler/"}) :cljs (scheduled-executor)))) (defonce