Permalink
Browse files

Merge pull request #98 from jmoses/master

Make CPU counter try a little harder for linux OS
  • Loading branch information...
2 parents cd8f976 + a747b66 commit 2121cddb047dabe4c0153e5fb83ff14b08423fd1 @tarcieri tarcieri committed Oct 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/celluloid/cpu_counter.rb
@@ -6,7 +6,7 @@ module CPUCounter
when 'darwin'
@cores = Integer(`sysctl hw.ncpu`[/\d+/])
when 'linux'
- @cores = File.read("/proc/cpuinfo").scan(/core id\s+: \d+/).uniq.size
+ @cores = File.read("/proc/cpuinfo").scan(/(?:core id|processor)\s+: \d+/).uniq.size
when 'mingw', 'mswin'
@cores = Integer(`SET NUMBER_OF_PROCESSORS`[/\d+/])
else

0 comments on commit 2121cdd

Please sign in to comment.