summaryrefslogtreecommitdiff
path: root/sample/drb
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-27 15:36:32 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-27 15:36:32 +0000
commita1162d2bf8fda567f67006ea063c033daca0860a (patch)
tree87ae99fdd7a106a913536aac8d579c6495048c0e /sample/drb
parent0131ff249ae19e1decc7817a53ca7c523293e72a (diff)
using "DRb.thread.join" instead of "gets"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/drb')
-rw-r--r--sample/drb/darray.rb3
-rw-r--r--sample/drb/dchats.rb3
-rw-r--r--sample/drb/dhasen.rb3
-rw-r--r--sample/drb/dqueue.rb3
-rw-r--r--sample/drb/drbm.rb3
-rw-r--r--sample/drb/drbssl_s.rb3
-rw-r--r--sample/drb/gw_s.rb3
-rw-r--r--sample/drb/holders.rb3
-rw-r--r--sample/drb/name.rb3
-rw-r--r--sample/drb/ring_echo.rb2
-rw-r--r--sample/drb/speeds.rb4
11 files changed, 13 insertions, 20 deletions
diff --git a/sample/drb/darray.rb b/sample/drb/darray.rb
index bee295d..95ee01f 100644
--- a/sample/drb/darray.rb
+++ b/sample/drb/darray.rb
@@ -8,6 +8,5 @@ require 'drb/drb'
here = ARGV.shift
DRb.start_service(here, [1, 2, "III", 4, "five", 6])
puts DRb.uri
-puts '[return] to exit'
-gets
+DRb.thread.join
diff --git a/sample/drb/dchats.rb b/sample/drb/dchats.rb
index b3133d1..012dfee 100644
--- a/sample/drb/dchats.rb
+++ b/sample/drb/dchats.rb
@@ -66,6 +66,5 @@ if __FILE__ == $0
here = ARGV.shift
DRb.start_service(here, ChatServer.new)
puts DRb.uri
- puts '[return] to exit.'
- gets
+ DRb.thread.join
end
diff --git a/sample/drb/dhasen.rb b/sample/drb/dhasen.rb
index 5dac888..fb1724a 100644
--- a/sample/drb/dhasen.rb
+++ b/sample/drb/dhasen.rb
@@ -37,7 +37,6 @@ end
if __FILE__ == $0
DRb.start_service(nil, Dhasen.new)
puts DRb.uri
- puts '[return] to exit.'
- gets
+ DRb.thread.join
end
diff --git a/sample/drb/dqueue.rb b/sample/drb/dqueue.rb
index 90ec56c..a5a4365 100644
--- a/sample/drb/dqueue.rb
+++ b/sample/drb/dqueue.rb
@@ -8,6 +8,5 @@ require 'drb/drb'
DRb.start_service(nil, Queue.new)
puts DRb.uri
-puts '[return] to exit'
-gets
+DRb.thread.join
diff --git a/sample/drb/drbm.rb b/sample/drb/drbm.rb
index 37a26cd..74a15a4 100644
--- a/sample/drb/drbm.rb
+++ b/sample/drb/drbm.rb
@@ -54,6 +54,7 @@ if __FILE__ == $0
puts "#{s1.uri} #{s2.uri}"
- gets
+ s1.thread.join
+ s2.thread.join
end
diff --git a/sample/drb/drbssl_s.rb b/sample/drb/drbssl_s.rb
index 94d02f6..4d96f59 100644
--- a/sample/drb/drbssl_s.rb
+++ b/sample/drb/drbssl_s.rb
@@ -28,5 +28,4 @@ end
DRb.start_service(here, HelloWorld.new, config)
puts DRb.uri
-$stdin.gets
-DRb.stop_service
+DRb.thread.join
diff --git a/sample/drb/gw_s.rb b/sample/drb/gw_s.rb
index f91249b..c2bea0b 100644
--- a/sample/drb/gw_s.rb
+++ b/sample/drb/gw_s.rb
@@ -6,4 +6,5 @@ DRb.install_id_conv(DRb::GWIdConv.new)
gw = DRb::GW.new
s1 = DRb::DRbServer.new(ARGV.shift, gw)
s2 = DRb::DRbServer.new(ARGV.shift, gw)
-gets
+s1.thread.join
+s2.thread.join
diff --git a/sample/drb/holders.rb b/sample/drb/holders.rb
index 2093903..2d9974f 100644
--- a/sample/drb/holders.rb
+++ b/sample/drb/holders.rb
@@ -59,6 +59,5 @@ if __FILE__ == $0
DRb.start_service(nil, DRbEx4.new)
puts DRb.uri
- puts '[return] to exit'
- gets
+ DRb.thread.join
end
diff --git a/sample/drb/name.rb b/sample/drb/name.rb
index 461f965..86b478f 100644
--- a/sample/drb/name.rb
+++ b/sample/drb/name.rb
@@ -112,7 +112,6 @@ if __FILE__ == $0
DRb.install_id_conv(name_conv)
DRb.start_service(uri, Front.new)
puts DRb.uri
- puts '[return] to exit'
- gets
+ DRb.thread.join
end
diff --git a/sample/drb/ring_echo.rb b/sample/drb/ring_echo.rb
index 0fde11b..0633aa8 100644
--- a/sample/drb/ring_echo.rb
+++ b/sample/drb/ring_echo.rb
@@ -26,5 +26,5 @@ ts.read_all([:name, :RingEcho, nil, nil]).each do |tuple|
end
ts.write([:name, :RingEcho, RingEcho.new(DRb.uri), ''], renewer)
-$stdin.gets
+DRb.thread.join
diff --git a/sample/drb/speeds.rb b/sample/drb/speeds.rb
index 5dcd02a..76b4b29 100644
--- a/sample/drb/speeds.rb
+++ b/sample/drb/speeds.rb
@@ -28,6 +28,4 @@ when /^druby:/
DRb.start_service(uri, Foo.new)
end
-puts '[enter] to exit'
-gets
-
+DRb.thread.join