From ff940137dc5098c9d8094e041e9be053cb3e139f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 5 Sep 2013 23:11:59 +0000 Subject: test_poll: be less dependent on signal handler ordering Just spam the thread several times to force the wakeup to happen and not be as dependent on signal handler execution ordering of different Ruby VMs. Tested-by: Hleb Valoshka <375gnu@gmail.com> --- test/test_poll.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_poll.rb b/test/test_poll.rb index 5bfc70b..d9a2b07 100644 --- a/test/test_poll.rb +++ b/test/test_poll.rb @@ -96,7 +96,10 @@ class TestPoll < Test::Unit::TestCase end thr = Thread.new do sleep 0.100 - Process.kill(:USR1, $$) + 100.times do + Process.kill(:USR1, $$) + Thread.pass + end end t0 = Time.now res = Kgio.poll(pollset, 1000) -- cgit v1.2.3-24-ge0c7