4 require 'sleepy_penguin'
6 class TestEpollGC < Test::Unit::TestCase
10 GC.stress = true if GC.respond_to?(:stress=)
15 GC.stress = false if GC.respond_to?(:stress=)
18 def add_pipe_no_tailcall(m, depth)
19 add_pipe(m, depth += 1)
22 def add_pipe(m, depth = 0)
25 warn "wr: #{wr.fileno}"
26 @ep.__send__(m, wr, Epoll::OUT)
28 add_pipe_no_tailcall(m, depth + 1)
37 @ep.wait(nil, 10) { |flags, obj| p [ flags, x = obj ] }
38 assert x, "#{x.inspect}"
42 2048.times { IO.pipe; File.open(__FILE__)}
47 end if ENV["GC_STRESS"].to_i != 0