lib/async/scheduler.rb in async-1.28.5 vs lib/async/scheduler.rb in async-1.28.6

- old
+ new

@@ -32,27 +32,23 @@ end end def initialize(reactor) @reactor = reactor - @wrappers = nil end + attr :wrappers + def set! - @wrappers = {} Fiber.set_scheduler(self) end def clear! - # Because these instances are created with `autoclose: false`, this does not close the underlying file descriptor: - # @ios&.each_value(&:close) - - @wrappers = nil Fiber.set_scheduler(nil) end private def from_io(io) - @wrappers[io] ||= Wrapper.new(io, @reactor) + Wrapper.new(io, @reactor) end def io_wait(io, events, timeout = nil) wrapper = from_io(io)