Skip to content

Commit

Permalink
Merge pull request #351 from y-yagi/ensure_not_to_use_old_concurrent-…
Browse files Browse the repository at this point in the history
…ruby

Ensure not to use old `concurrent-ruby`
  • Loading branch information
grosser committed Aug 16, 2024
2 parents ab06d9e + 43c9805 commit b24e422
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/parallel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,10 @@ def instrument_start(item, index, options)
end

def available_processor_count
gem 'concurrent-ruby', '>= 1.3.4'
require 'concurrent-ruby'
Concurrent.available_processor_count.floor
rescue LoadError, NoMethodError
rescue LoadError
require 'etc'
Etc.nprocessors
end
Expand Down

0 comments on commit b24e422

Please sign in to comment.