lib/celluloid/internals/cpu_counter.rb in celluloid-essentials-0.20.1 vs lib/celluloid/internals/cpu_counter.rb in celluloid-essentials-0.20.1.1
- old
+ new
@@ -40,9 +40,10 @@
end
def from_win32ole
require 'win32ole'
WIN32OLE.connect("winmgmts://").ExecQuery("select * from Win32_ComputerSystem").NumberOfProcessors
+ rescue LoadError
rescue
end
def from_sysctl
Integer `sysctl -n hw.ncpu 2>/dev/null`