From c8b260b6d4334c47704a1fa365942055508f1074 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 28 Dec 2018 00:33:10 +0000 Subject: server_mp: favor "Kernel#select" instead of "IO.select" Golfing to eliminate a constant lookup and inline-constant-cache entry --- lib/yahns/server_mp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yahns/server_mp.rb b/lib/yahns/server_mp.rb index c9cd207..7b2f9b7 100644 --- a/lib/yahns/server_mp.rb +++ b/lib/yahns/server_mp.rb @@ -159,7 +159,7 @@ module Yahns::ServerMP # :nodoc: def mp_sig_handle(watch, alive) # not performance critical watch.delete_if { |io| io.to_io.closed? } - if r = IO.select(watch, nil, nil, alive ? nil : 0.1) + if r = select(watch, nil, nil, alive ? nil : 0.1) r[0].each(&:yahns_step) end case @sig_queue.shift -- cgit v1.2.3-24-ge0c7