examples/echo_worker.rb in pigato-0.5.0 vs examples/echo_worker.rb in pigato-0.5.1
- old
+ new
@@ -5,22 +5,22 @@
#require "pigato"
def start
ts = []
- (0..10).each do |tid|
+ (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
- #sleep 0.1
end
}
+ sleep 0.5
end
ts.each do |to|
to.join
end