зеркало из https://github.com/github/ruby.git
webrick: avoid needless wakeup from IO.select
Since r51231 ("webrick/server.rb: stop immediately"), there is no need to poll on the @status change every two seconds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
310e91f505
Коммит
4c6335e93b
|
@ -167,7 +167,7 @@ module WEBrick
|
|||
while @status == :Running
|
||||
begin
|
||||
sp = shutdown_pipe[0]
|
||||
if svrs = IO.select([sp, *@listeners], nil, nil, 2.0)
|
||||
if svrs = IO.select([sp, *@listeners])
|
||||
if svrs[0].include? sp
|
||||
# swallow shutdown pipe
|
||||
buf = String.new
|
||||
|
|
Загрузка…
Ссылка в новой задаче