mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add DRb::ExtServManager#uri=.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
37abc5eaa3
commit
8b9422f502
3 changed files with 10 additions and 2 deletions
|
@ -25,8 +25,9 @@ module DRb
|
|||
@waiting = []
|
||||
@queue = Queue.new
|
||||
@thread = invoke_thread
|
||||
@uri = nil
|
||||
end
|
||||
attr_reader :server
|
||||
attr_accessor :uri
|
||||
|
||||
def service(name)
|
||||
while true
|
||||
|
@ -84,7 +85,8 @@ module DRb
|
|||
return if @servers.include?(name)
|
||||
@servers[name] = false
|
||||
end
|
||||
Process.detach(Process.spawn("#{command} #{DRb.uri} #{name}"))
|
||||
uri = @uri || DRb.uri
|
||||
Process.detach(Process.spawn("#{command} #{uri} #{name}"))
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue