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+
13## Current Release v1.0.2 (2 May 2016)
24
35* 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
2828 # processor", which taked into account hyperthreading.
2929 #
3030 # * AIX: /usr/sbin/pmcycles (AIX 5+), /usr/sbin/lsdev
31+ # * Alpha: /usr/bin/nproc (/proc/cpuinfo exists but cannot be used)
3132 # * BSD: /sbin/sysctl
3233 # * Cygwin: /proc/cpuinfo
3334 # * Darwin: /usr/bin/hwprefs, /usr/sbin/sysctl
@@ -84,6 +85,8 @@ def compute_processor_count
8485 result = WIN32OLE . connect ( "winmgmts://" ) . ExecQuery (
8586 "select NumberOfLogicalProcessors from Win32_Processor" )
8687 result . to_enum . collect ( &:NumberOfLogicalProcessors ) . reduce ( :+ )
88+ elsif File . executable? ( "/usr/bin/nproc" )
89+ IO . popen ( "/usr/bin/nproc --all" ) . read . to_i
8790 elsif File . readable? ( "/proc/cpuinfo" )
8891 IO . read ( "/proc/cpuinfo" ) . scan ( /^processor/ ) . size
8992 elsif File . executable? ( "/usr/bin/hwprefs" )
You can’t perform that action at this time.
0 commit comments