diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/utils.rb b/lib/utils.rb index 0213c6d..b37437b 100644 --- a/lib/utils.rb +++ b/lib/utils.rb @@ -67,8 +67,15 @@ module Ag '' end + @proc_count = nil + def proc_count=(cnt) + cnt = nil if cnt == false + @proc_count = cnt + end + def proc_count + return @proc_count unless @proc_count.nil? or @proc_count == false (Parallel::ProcessorCount.processor_count.to_f * 0.75).floor end end -end
\ No newline at end of file +end |