diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-09-05 23:11:59 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-09-05 23:11:59 +0000 |
commit | ff940137dc5098c9d8094e041e9be053cb3e139f (patch) | |
tree | 2aacef9353fd1bcb9df93ebcaa0696b4535034ea /test | |
parent | 90340eb8f2c5bf820eabd3c25fb39e45285b1c40 (diff) | |
download | kgio-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>
Diffstat (limited to 'test')
-rw-r--r-- | test/test_poll.rb | 5 |
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) |