File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change
1
+ * Support Alpha with ` Concurrent::processor_count `
2
+
1
3
## Current Release v1.0.2 (2 May 2016)
2
4
3
5
* Fix bug with ` Concurrent::Map ` MRI backend ` #inspect ` method
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ def initialize
28
28
# processor", which taked into account hyperthreading.
29
29
#
30
30
# * AIX: /usr/sbin/pmcycles (AIX 5+), /usr/sbin/lsdev
31
+ # * Alpha: /usr/bin/nproc (/proc/cpuinfo exists but cannot be used)
31
32
# * BSD: /sbin/sysctl
32
33
# * Cygwin: /proc/cpuinfo
33
34
# * Darwin: /usr/bin/hwprefs, /usr/sbin/sysctl
@@ -84,6 +85,8 @@ def compute_processor_count
84
85
result = WIN32OLE . connect ( "winmgmts://" ) . ExecQuery (
85
86
"select NumberOfLogicalProcessors from Win32_Processor" )
86
87
result . to_enum . collect ( &:NumberOfLogicalProcessors ) . reduce ( :+ )
88
+ elsif File . executable? ( "/usr/bin/nproc" )
89
+ IO . popen ( "/usr/bin/nproc --all" ) . read . to_i
87
90
elsif File . readable? ( "/proc/cpuinfo" )
88
91
IO . read ( "/proc/cpuinfo" ) . scan ( /^processor/ ) . size
89
92
elsif File . executable? ( "/usr/bin/hwprefs" )
You can’t perform that action at this time.
0 commit comments