summaryrefslogtreecommitdiff
path: root/sample/drb/holderc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/drb/holderc.rb')
-rw-r--r--sample/drb/holderc.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/sample/drb/holderc.rb b/sample/drb/holderc.rb
new file mode 100644
index 0000000000..8dd72ebd11
--- /dev/null
+++ b/sample/drb/holderc.rb
@@ -0,0 +1,22 @@
+require 'drb/drb'
+
+begin
+ there = ARGV.shift || raise
+rescue
+ $stderr.puts("usage: #{$0} <server_uri>")
+ exit 1
+end
+
+DRb.start_service()
+ro = DRbObject.new(nil, there)
+
+ary = []
+10.times do
+ ary.push(ro.gen)
+end
+
+sleep 5 if $DEBUG
+
+ary.each do |e|
+ p e.sample([1])
+end