File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/concurrent-ruby/concurrent/utility Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def compute_physical_processor_count
8383 # Bail out if both commands returned something unexpected
8484 processor_count
8585 else
86- # powershell: "\nNumberOfCores\n-------------\n 4\n\n\n"
86+ # powershell: "\nNumberOfCores\n-------------\n 4\n\n\n"
8787 # wmic: "NumberOfCores \n\n4 \n\n\n\n"
8888 result . scan ( /\d +/ ) . map ( &:to_i ) . reduce ( :+ )
8989 end
@@ -181,13 +181,14 @@ def self.physical_processor_count
181181 end
182182
183183 # Number of processors cores available for process scheduling.
184- # Returns `nil` if there is no #cpu_quota, or a `Float` if the
185- # process is inside a cgroup with a dedicated CPU quota (typically Docker).
184+ # This method takes in account the CPU quota if the process is inside a cgroup with a
185+ # dedicated CPU quota (typically Docker).
186+ # Otherwise it returns the same value as #processor_count but as a Float.
186187 #
187188 # For performance reasons the calculated value will be memoized on the first
188189 # call.
189190 #
190- # @return [nil, Float] number of available processors
191+ # @return [Float] number of available processors
191192 def self . available_processor_count
192193 processor_counter . available_processor_count
193194 end
You can’t perform that action at this time.
0 commit comments