Skip to content

Commit

Permalink
Use Concurrent.available_processor_count instead of `Concurrent.usa…
Browse files Browse the repository at this point in the history
…ble_processor_count`
  • Loading branch information
heka1024 committed Jul 30, 2024
1 parent 09f348e commit a2a1c7a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sentry-ruby/lib/sentry/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,8 @@ def run_post_initialization_callbacks
end

def processor_count
if Concurrent.respond_to?(:usable_processor_count)
Concurrent.usable_processor_count
else
Concurrent.processor_count
end
available_processor_count = Concurrent.available_processor_count if Concurrent.respond_to?(:available_processor_count)
available_processor_count || Concurrent.processor_count
end
end
end

0 comments on commit a2a1c7a

Please sign in to comment.