diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-04-30 02:24:19 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-04-30 02:24:19 +0000 |
commit | 05448f74a80b631410f0c39ea4b333d26acec074 (patch) | |
tree | 00f4b13ac347bc8ba00615d8d24f41ffdeaedcc0 | |
parent | c1fdf07413364407d148fb588cd1c2ba1fe7f677 (diff) | |
download | sleepy_penguin-05448f74a80b631410f0c39ea4b333d26acec074.tar.gz |
Wait longer before killing the epoll_wait thread, as we may not have entered epoll_wait inside that thread before we send Thread#kill to it. This caused intermittent IOError as the thread delected the Epoll::IO object was already closed, before the snapshot (to prevent GC) could be made.
-rw-r--r-- | test/test_epoll.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_epoll.rb b/test/test_epoll.rb index bdb550b..4b4437a 100644 --- a/test/test_epoll.rb +++ b/test/test_epoll.rb @@ -197,7 +197,8 @@ class TestEpoll < Test::Unit::TestCase thr = Thread.new { @ep.wait { |flags, obj| tmp << [ flags, obj ] } } @rd.close @wr.close - assert_nil thr.join(0.01) + Thread.pass + assert_nil thr.join(0.25) assert thr.alive? thr.kill assert tmp.empty? |