diff --git a/lib/drb/extserv.rb b/lib/drb/extserv.rb index a93d5d1..9523fe8 100644 --- a/lib/drb/extserv.rb +++ b/lib/drb/extserv.rb @@ -18,7 +18,7 @@ def initialize(there, name, server=nil) @name = name ro = DRbObject.new(nil, there) synchronize do - @invoker = ro.regist(name, DRbObject.new(self, @server.uri)) + @invoker = ro.register(name, DRbObject.new(self, @server.uri)) end end attr_reader :server @@ -29,7 +29,7 @@ def front def stop_service synchronize do - @invoker.unregist(@name) + @invoker.unregister(@name) server = @server @server = nil server.stop_service diff --git a/lib/drb/extservm.rb b/lib/drb/extservm.rb index 040e4e3..9333a10 100644 --- a/lib/drb/extservm.rb +++ b/lib/drb/extservm.rb @@ -44,19 +44,21 @@ def service(name) end end - def regist(name, ro) + def register(name, ro) synchronize do @servers[name] = ro @cond.signal end self end + alias regist register - def unregist(name) + def unregister(name) synchronize do @servers.delete(name) end end + alias unregist unregister private def invoke_thread