From: Koichi Sasada Date: 2011-06-11T15:12:41+09:00 Subject: [ruby-core:36978] [Ruby 1.9 - Bug #3674] dRuby サーバプロセスを停止する時に時間がかかることがある Issue #3674 has been updated by Koichi Sasada. ������������������������������������������������������������������������ ---------------------------------------- Bug #3674: dRuby ��������������������������������������������������������������������������� http://redmine.ruby-lang.org/issues/3674 Author: Tomoyuki Chikanaga Status: Assigned Priority: Normal Assignee: Masatoshi Seki Category: Target version: 1.9.3 ruby -v: ruby 1.9.3dev (2010-08-05 trunk 28840) [i686-linux] =begin CentOS release 5.4 Linux ��������������� dRuby ������������������������������������������������ CPU ��������������������� ��������������������������������������������������������������������� Redhat Enterprise Linux, Ubuntu 8.10, openSUSE 11.1 ������������������������������������������������������������ ������������������������������������������������ CentOS ������������������������������������ (CPU ���������/��������� libpthread ������������������������������������������������������������������������������) ������������������������������������������������������������������������ * server.rb require "drb" class S def m1 puts "S#m1 called" sleep 10 end end begin front = S.new uri = ARGV[0] || "druby://localhost:0" puts DRb.start_service(uri, front).uri DRb.thread.join rescue Interrupt ensure DRb.stop_service end * client.rb require "drb" obj = DRbObject.new_with_uri ARGV[0] obj.m1 * ��������� $ ruby server.rb druby://localhost:10000 druby://localhost:10000 S#m1 called <- Ctrl-C ��������� (������������������) $ ruby client.rb druby://localhost:10000 ������������������ gdb attach ��������������� DRbServer#kill_sub_thread ��� dRuby ��������������������������� Thread ��� kill ������������������������������������������������������������������ ������������������ Thread.pass ��������������������������������������������������� Index: lib/drb/drb.rb =================================================================== --- lib/drb/drb.rb (revision 28880) +++ lib/drb/drb.rb (working copy) @@ -1421,6 +1421,7 @@ list.each do |th| th.kill if th.alive? end + Thread.pass list = @grp.list end end =end -- http://redmine.ruby-lang.org