1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/fiddle/test_function.rb (test_nogvl_poll): stop timer hack

EINTR seems unavoidable in real programs (or MJIT), so maybe
it's not worth dealing with.  r64353 relies on POSIX timers
to signal.

Switching pipes and sockets to non-blocking by default would let
us get rid of POSIX timers, timer pthread and this hack:
https://bugs.ruby-lang.org/issues/14968

[ruby-core:88360] [Misc #14937]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-08-14 00:31:31 +00:00
parent 8da12db13d
commit 1e769ce6ed

View file

@ -73,6 +73,12 @@ module Fiddle
end
def test_nogvl_poll
# XXX hack to quiet down CI errors on EINTR from r64353
# [ruby-core:88360] [Misc #14937]
# Making pipes (and sockets) non-blocking by default would allow
# us to get rid of POSIX timers / timer pthread
# https://bugs.ruby-lang.org/issues/14968
IO.pipe { |r,w| IO.select([r], [w]) }
begin
poll = @libc['poll']
rescue Fiddle::DLError