about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-05 23:11:59 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-05 23:11:59 +0000
commitff940137dc5098c9d8094e041e9be053cb3e139f (patch)
tree2aacef9353fd1bcb9df93ebcaa0696b4535034ea
parent90340eb8f2c5bf820eabd3c25fb39e45285b1c40 (diff)
downloadkgio-ff940137dc5098c9d8094e041e9be053cb3e139f.tar.gz
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>
-rw-r--r--test/test_poll.rb5
1 files changed, 4 insertions, 1 deletions
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)