diff options
Diffstat (limited to 'sample/drb')
-rw-r--r-- | sample/drb/darray.rb | 3 | ||||
-rw-r--r-- | sample/drb/dchats.rb | 3 | ||||
-rw-r--r-- | sample/drb/dhasen.rb | 3 | ||||
-rw-r--r-- | sample/drb/dqueue.rb | 3 | ||||
-rw-r--r-- | sample/drb/drbm.rb | 3 | ||||
-rw-r--r-- | sample/drb/drbssl_s.rb | 3 | ||||
-rw-r--r-- | sample/drb/gw_s.rb | 3 | ||||
-rw-r--r-- | sample/drb/holders.rb | 3 | ||||
-rw-r--r-- | sample/drb/name.rb | 3 | ||||
-rw-r--r-- | sample/drb/ring_echo.rb | 2 | ||||
-rw-r--r-- | sample/drb/speeds.rb | 4 |
11 files changed, 13 insertions, 20 deletions
diff --git a/sample/drb/darray.rb b/sample/drb/darray.rb index bee295d27..95ee01ff0 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 b3133d116..012dfeeeb 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 5dac88853..fb1724afa 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 90ec56ce6..a5a43655f 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 37a26cdfa..74a15a469 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 94d02f63c..4d96f591d 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 f91249b3e..c2bea0baa 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 20939034c..2d9974f3f 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 461f965c1..86b478fbe 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 0fde11b9e..0633aa839 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 5dcd02a56..76b4b29db 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 |