Skip to content

Commit c1aeeed

Browse files
committed
Fix incorrect @largest_length counting
It was reporting value lessen by 1.
1 parent 7bae58b commit c1aeeed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/concurrent/executor/ruby_thread_pool_executor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ def ns_worker_died(worker)
232232
def ns_add_busy_worker
233233
return if @pool.size >= @max_length
234234

235-
@largest_length = @pool.length if @pool.length > @largest_length
236235
@pool << (worker = Worker.new(self))
236+
@largest_length = @pool.length if @pool.length > @largest_length
237237
worker
238238
end
239239

0 commit comments

Comments
 (0)