Skip to content

Commit 70d7972

Browse files
authored
Don't override given threads number (#22)
1 parent 84cd1f2 commit 70d7972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/async/container/hybrid.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def run(count: nil, forks: nil, threads: nil, **options, &block)
3535
processor_count = Container.processor_count
3636
count ||= processor_count ** 2
3737
forks ||= [processor_count, count].min
38-
threads = (count / forks).ceil
38+
threads ||= (count / forks).ceil
3939

4040
forks.times do
4141
self.spawn(**options) do |instance|

0 commit comments

Comments
 (0)