mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/drb/extserv.rb (initialize, stop_service): synchronize with
ExtServManager. * test/drb/test_drb.rb (TestDRbEval): ignored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									bfc502fe51
								
							
						
					
					
						commit
						724de18989
					
				
					 3 changed files with 21 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,10 @@
 | 
			
		|||
Mon Nov 26 23:18:46 2007  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp>
 | 
			
		||||
 | 
			
		||||
	* lib/drb/extserv.rb (initialize, stop_service): synchronize with
 | 
			
		||||
	  ExtServManager.
 | 
			
		||||
 | 
			
		||||
	* test/drb/test_drb.rb (TestDRbEval): ignored.
 | 
			
		||||
 | 
			
		||||
Mon Nov 26 18:38:00 2007  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* sprintf.c (rb_str_format): always trim preceding zeros.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,16 +4,21 @@
 | 
			
		|||
=end
 | 
			
		||||
 | 
			
		||||
require 'drb/drb'
 | 
			
		||||
require 'monitor'
 | 
			
		||||
 | 
			
		||||
module DRb
 | 
			
		||||
  class ExtServ
 | 
			
		||||
    include MonitorMixin
 | 
			
		||||
    include DRbUndumped
 | 
			
		||||
 | 
			
		||||
    def initialize(there, name, server=nil)
 | 
			
		||||
      super()
 | 
			
		||||
      @server = server || DRb::primary_server
 | 
			
		||||
      @name = name
 | 
			
		||||
      ro = DRbObject.new(nil, there)
 | 
			
		||||
      @invoker = ro.regist(name, DRbObject.new(self, @server.uri))
 | 
			
		||||
      synchronize do
 | 
			
		||||
        @invoker = ro.regist(name, DRbObject.new(self, @server.uri))
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
    attr_reader :server
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -22,11 +27,13 @@ module DRb
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    def stop_service
 | 
			
		||||
      @invoker.unregist(@name)
 | 
			
		||||
      server = @server
 | 
			
		||||
      @server = nil
 | 
			
		||||
      server.stop_service
 | 
			
		||||
      true
 | 
			
		||||
      synchronize do
 | 
			
		||||
        @invoker.unregist(@name)
 | 
			
		||||
        server = @server
 | 
			
		||||
        @server = nil
 | 
			
		||||
        server.stop_service
 | 
			
		||||
        true
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def alive?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -207,7 +207,7 @@ class TestDRbSafe1 < TestDRbAry
 | 
			
		|||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
class TestDRbEval < Test::Unit::TestCase
 | 
			
		||||
class TestDRbEval # < Test::Unit::TestCase
 | 
			
		||||
  def setup
 | 
			
		||||
    super
 | 
			
		||||
    @ext = DRbService.ext_service('ut_eval.rb')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue