Skip to content

Commit

Permalink
Add better default for default scheduler parallelism parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Oct 19, 2023
1 parent 01408c8 commit 1fd36f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/promesa/exec.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fd36f7

Please sign in to comment.