Sha256: d5322c992045ac596c443b27a9f4565d859050a7ee9548fa88325bc9ae0db2e8
Contents?: true
Size: 526 Bytes
Versions: 1
Compression:
Stored size: 526 Bytes
Contents
#!/usr/bin/env ruby require "rubygems" require "#{File.dirname(__FILE__)}/../lib/pigato.rb" #require "pigato" def start ts = [] (0..100).each do |tid| ts << Thread.new { worker = Pigato::Worker.new('tcp://127.0.0.1:55555', 'echo') worker.start loop do request = worker.recv if !request.nil? worker.reply request end end } sleep 0.5 end ts.each do |to| to.join end end (0..2).each do |pid| fork do start end end Process.waitall
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pigato-0.5.1 | examples/echo_worker.rb |