about summary refs log tree commit homepage
diff options
context:
space:
mode:
authornormalperson@yhbt.net <normalperson@yhbt.net>2013-04-29 19:52:37 +0000
committerEric Wong <normalperson@yhbt.net>2013-04-29 21:01:02 +0000
commitcd946812abada277c9c8b85d9165748ef066abbf (patch)
treeb4a354c67dea7168ace61f104e80f6b1d7324524
parentc04b173f52c362c64899bd7b2942cab0658e1cee (diff)
downloadsleepy_penguin-cd946812abada277c9c8b85d9165748ef066abbf.tar.gz
Due to strange scheduling, the ensure clause could fire while
the thread was still inside wr.syswrite even though the main
thread received the event and exited the method.
-rw-r--r--test/test_kqueue_io.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_kqueue_io.rb b/test/test_kqueue_io.rb
index dc5f8ea..904a1cc 100644
--- a/test/test_kqueue_io.rb
+++ b/test/test_kqueue_io.rb
@@ -72,6 +72,8 @@ class TestKqueueIO < Test::Unit::TestCase
     assert_equal EvFilt::READ, events[0][1]
     assert_equal 1, n
 
+    thr.join
+
     # we should be drained
     events = []
     n = kq.kevent(nil, 1, 0) do |ident,filter,flags,fflags,data,udata|