Skip to content

Commit

Permalink
(PE-37376) Refactor instance-creation-concurrency default, set to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
justinstoller committed Jun 3, 2024
1 parent b151955 commit ef6a947
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
[config :- jruby-schemas/JRubyConfig]
(let [multithreaded (:multithreaded config)
size (:max-active-instances config)
creation-concurrency (get config :instance-creation-concurrency 4)
creation-concurrency (:instance-creation-concurrency config)
creation-service (Executors/newFixedThreadPool creation-concurrency)]
(if multithreaded
{:pool (instantiate-reference-pool size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
(update-in [:environment-vars] #(or % {}))
(update-in [:lifecycle] initialize-lifecycle-fns)
(update-in [:multithreaded] #(if (nil? %) false %))
(update-in [:instance-creation-concurrency] #(if (nil? %) 3 %))
jruby-internal/initialize-gem-path))

(schema/defn register-event-handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
:profiling-mode SupportedJRubyProfilingModes
:profiler-output-file schema/Str
:multithreaded schema/Bool
(schema/optional-key :instance-creation-concurrency) schema/Int})
:instance-creation-concurrency schema/Int})

(def JRubyPoolAgent
"An agent configured for use in managing JRuby pools"
Expand Down

0 comments on commit ef6a947

Please sign in to comment.