Skip to content

Commit

Permalink
Fix compilation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag authored Mar 25, 2022
1 parent 223af85 commit 685d61b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/parallel/processor_count.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# frozen_string_literal: true
require 'etc'

module Parallel
# TODO: inline this method into parallel.rb and kill physical_processor_count in next major release
module ProcessorCount
# Number of processors seen by the OS, used for process scheduling
def processor_count
require 'etc'
@processor_count ||= Integer(ENV['PARALLEL_PROCESSOR_COUNT'] || Etc.nprocessors)
end

Expand Down

0 comments on commit 685d61b

Please sign in to comment.