Class: Async::RSpec::Reactor

Inherits:
Object
  • Object
show all
Defined in:
lib/async/rspec/reactor.rb

Class Method Summary collapse

Class Method Details

.current_ios(gc: GC.start) ⇒ Object



27
28
29
30
31
32
# File 'lib/async/rspec/reactor.rb', line 27

def self.current_ios(gc: GC.start)
	all_ios = ObjectSpace.each_object(IO).to_a.sort_by(&:object_id)
	
	# We are not interested in ios that have been closed already:
	return all_ios.reject{|io| io.closed?}
end