зеркало из https://github.com/github/ruby.git
drb.rb: do not wait handler threads
* lib/drb/drb.rb (stop_service): just stop but do not wait handler threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c474ecb0df
Коммит
632fb2e15b
|
@ -1467,13 +1467,12 @@ module DRb
|
|||
if Thread.current['DRb'] && Thread.current['DRb']['server'] == self
|
||||
Thread.current['DRb']['stop_service'] = true
|
||||
else
|
||||
threads = [@thread, *@grp.list]
|
||||
if @protocol.respond_to? :shutdown
|
||||
@protocol.shutdown
|
||||
else
|
||||
threads.each {|thread| thread.kill} # xxx: Thread#kill
|
||||
[@thread, *@grp.list].each {|thread| thread.kill} # xxx: Thread#kill
|
||||
end
|
||||
threads.each {|thread| thread.join}
|
||||
@thread.join
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче