Sha256: 2a29f0409e8de2d1a0d1923145ebbb11f4983e0d23c5d9b4384e52a3447ed12f
Contents?: true
Size: 435 Bytes
Versions: 4
Compression:
Stored size: 435 Bytes
Contents
#!/usr/bin/env ruby $:.unshift File.dirname(__FILE__)+"/../../lib/" require 'magent' id = "#{rand(16)}#{rand(16)}#{rand(16)}#{rand(16)}" values = (1..5).to_a.map { rand(10) } puts values.join(" + ") Magent.push("/workers", :sum, id, *values) channel = Magent::GenericChannel.new("+#{id}") loop do v = channel.dequeue; if v $stdout.puts v.inspect break end sleep 0.1 end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
magent-0.2 | examples/comm/run.rb |
magent-0.1.3 | examples/comm/run.rb |
magent-0.1.2 | examples/comm/run.rb |
magent-0.1.1 | examples/comm/run.rb |