diff --git a/lib/async/scheduler.rb b/lib/async/scheduler.rb index 4bba74bf..07b9c538 100644 --- a/lib/async/scheduler.rb +++ b/lib/async/scheduler.rb @@ -46,6 +46,7 @@ def initialize(parent = nil, selector: nil) # @returns [Float] The load of the scheduler. 0.0 means no load, 1.0 means fully loaded or over-loaded. def load total_time = @busy_time + @idle_time + $stderr.puts "@busy_time: #{@busy_time} @idle_time: #{@idle_time} total_time: #{total_time}" # If the total time is zero, then the load is zero: return 0.0 if total_time.zero?