Skip to content

Commit 8c1c259

Browse files
authored
Use Concurrent.available_processor_count instead of Concurrent.usable_processor_count (#2358)
1 parent 3fb9b67 commit 8c1c259

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### Features
44

5+
- Use `Concurrent.available_processor_count` instead of `Concurrent.usable_processor_count` ([#2358](https://github.com/getsentry/sentry-ruby/pull/2358))
6+
57
- Support for tracing Faraday requests ([#2345](https://github.com/getsentry/sentry-ruby/pull/2345))
68
- Closes [#1795](https://github.com/getsentry/sentry-ruby/issues/1795)
79
- Please note that the Faraday instrumentation has some limitations in case of async requests: https://github.com/lostisland/faraday/issues/1381

sentry-ruby/lib/sentry/configuration.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,8 @@ def run_post_initialization_callbacks
656656
end
657657

658658
def processor_count
659-
if Concurrent.respond_to?(:usable_processor_count)
660-
Concurrent.usable_processor_count
661-
else
662-
Concurrent.processor_count
663-
end
659+
available_processor_count = Concurrent.available_processor_count if Concurrent.respond_to?(:available_processor_count)
660+
available_processor_count || Concurrent.processor_count
664661
end
665662
end
666663
end

0 commit comments

Comments
 (0)