diff options
Diffstat (limited to 'jni/ruby/sample/drb/holderc.rb')
-rw-r--r-- | jni/ruby/sample/drb/holderc.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/jni/ruby/sample/drb/holderc.rb b/jni/ruby/sample/drb/holderc.rb new file mode 100644 index 0000000..e627916 --- /dev/null +++ b/jni/ruby/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 |