Skip to content

Commit 494652e

Browse files
committed
Use Truffle's primitive for available processors.
1 parent b7bc7d0 commit 494652e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/concurrent/utility/processor_counter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def physical_processor_count
7575
def compute_processor_count
7676
if Concurrent.on_jruby?
7777
java.lang.Runtime.getRuntime.availableProcessors
78+
elsif Concurrent.on_truffle?
79+
Truffle::Primitive.logical_processors
7880
else
7981
os_name = RbConfig::CONFIG["target_os"]
8082
if os_name =~ /mingw|mswin/

0 commit comments

Comments
 (0)