Sha256: 894bd0e315973c005cea6446c309f6103cd17ce1bb6f16eb1e6c9704e8bb4ce5
Contents?: true
Size: 654 Bytes
Versions: 2
Compression:
Stored size: 654 Bytes
Contents
require 'rubygems' require 'bundler' Bundler.setup require 'dcell' DCell.start :id => 'benchmark_receiver', :addr => 'tcp://127.0.0.1:2043' class AsyncReceiver include Celluloid attr_reader :count def initialize(n, actor) @n, @actor = n, actor @count = 0 end def increment @count += 1 @actor.complete! if @count == @n @count end end class Progenator include Celluloid def spawn_async_receiver(n, actor) AsyncReceiver.new(n, actor) end end class BenchmarkApplication < Celluloid::SupervisionGroup supervise DCell::SupervisionGroup supervise Progenator, :as => :progenator end BenchmarkApplication.run
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dcell-0.13.0.pre | benchmarks/receiver.rb |
dcell-0.12.0.pre | benchmarks/receiver.rb |