Skip to content

Commit

Permalink
added freebsd support
Browse files Browse the repository at this point in the history
  • Loading branch information
Masatomo Nakano committed Aug 24, 2010
1 parent 3636eca commit bccbec4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/parallel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def self.processor_count
`hwprefs cpu_count`.to_i
when /linux/
`cat /proc/cpuinfo | grep processor | wc -l`.to_i
when /freebsd/
`sysctl -n hw.ncpu`.to_i
end
end

Expand Down Expand Up @@ -163,4 +165,4 @@ def self.kill_on_ctrl_c(pids)
exit 1 # Quit with 'failed' signal
end
end
end
end

0 comments on commit bccbec4

Please sign in to comment.