Skip to content
Browse files

* 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
  • Loading branch information...
1 parent bfc502f commit 724de18989353b277b175e56ef69b78ec339510a seki committed
Showing with 21 additions and 7 deletions.
  1. +7 −0 ChangeLog
  2. +13 −6 lib/drb/extserv.rb
  3. +1 −1 test/drb/test_drb.rb
View
7 ChangeLog
@@ -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.
View
19 lib/drb/extserv.rb
@@ -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 @@ def front
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?
View
2 test/drb/test_drb.rb
@@ -207,7 +207,7 @@ def setup
end
end
-class TestDRbEval < Test::Unit::TestCase
+class TestDRbEval # < Test::Unit::TestCase
def setup
super
@ext = DRbService.ext_service('ut_eval.rb')

0 comments on commit 724de18

Please sign in to comment.
Something went wrong with that request. Please try again.