Sha256: accbb2896cc9f40ada7ed2cc73e076d006007af59575ce084e9942f548d67e31
Contents?: true
Size: 481 Bytes
Versions: 4
Compression:
Stored size: 481 Bytes
Contents
# encoding: utf-8 $: << File.expand_path('../../lib', __FILE__) require 'bundler/setup' require 'mikka' worker1 = Mikka.actor { |msg| puts "Worker 1 working on #{msg}" } worker2 = Mikka.actor { |msg| puts "Worker 2 working on #{msg}" } balancer = Mikka.load_balancer(:actors => [worker1, worker2]) 10.times do |i| balancer << "item #{i}" end balancer << Mikka::Messages.broadcast("a message to everyone") balancer << Mikka::Messages.poison_pill Mikka.registry.shutdown_all
Version data entries
4 entries across 4 versions & 1 rubygems