Skip to content

Commit 08a4aec

Browse files
committed
Formatting
1 parent 3c7fcbe commit 08a4aec

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/concurrent/executor/java_thread_pool_executor.rb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ def running?
9090
private
9191

9292
def ns_initialize(opts)
93-
min_length = opts.fetch(:min_threads, DEFAULT_MIN_POOL_SIZE).to_i
94-
max_length = opts.fetch(:max_threads, DEFAULT_MAX_POOL_SIZE).to_i
95-
idletime = opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT).to_i
96-
@max_queue = opts.fetch(:max_queue, DEFAULT_MAX_QUEUE_SIZE).to_i
93+
min_length = opts.fetch(:min_threads, DEFAULT_MIN_POOL_SIZE).to_i
94+
max_length = opts.fetch(:max_threads, DEFAULT_MAX_POOL_SIZE).to_i
95+
idletime = opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT).to_i
96+
@max_queue = opts.fetch(:max_queue, DEFAULT_MAX_QUEUE_SIZE).to_i
9797
@fallback_policy = opts.fetch(:fallback_policy, :abort)
9898

9999
raise ArgumentError.new("`max_threads` cannot be less than #{DEFAULT_MIN_POOL_SIZE}") if max_length < DEFAULT_MIN_POOL_SIZE
@@ -109,9 +109,12 @@ def ns_initialize(opts)
109109
end
110110

111111
@executor = java.util.concurrent.ThreadPoolExecutor.new(
112-
min_length, max_length,
113-
idletime, java.util.concurrent.TimeUnit::SECONDS,
114-
queue, FALLBACK_POLICY_CLASSES[@fallback_policy].new)
112+
min_length,
113+
max_length,
114+
idletime,
115+
java.util.concurrent.TimeUnit::SECONDS,
116+
queue,
117+
FALLBACK_POLICY_CLASSES[@fallback_policy].new)
115118

116119
self.auto_terminate = opts.fetch(:auto_terminate, true)
117120
end

0 commit comments

Comments
 (0)