lib/celluloid/actor.rb in celluloid-0.14.0 vs lib/celluloid/actor.rb in celluloid-0.14.1.pre

- old
+ new

@@ -25,11 +25,11 @@ # Actors are Celluloid's concurrency primitive. They're implemented as # normal Ruby objects wrapped in threads which communicate with asynchronous # messages. class Actor - attr_reader :subject, :proxy, :tasks, :links, :mailbox, :thread, :name, :locals + attr_reader :subject, :proxy, :tasks, :links, :mailbox, :thread, :name class << self extend Forwardable def_delegators "Celluloid::Registry.root", :[], :[]= @@ -76,12 +76,11 @@ # Obtain all running actors in the system def all actors = [] Thread.list.each do |t| - next unless t.celluloid? - next if t.task + next unless t.celluloid? && t.role == :actor actors << t.actor.proxy if t.actor && t.actor.respond_to?(:proxy) end actors end @@ -150,12 +149,11 @@ @receivers = Receivers.new @timers = Timers.new @running = true @exclusive = false @name = nil - @locals = {} - @thread = ThreadHandle.new do + @thread = ThreadHandle.new(:actor) do setup_thread run end @proxy = (options[:proxy_class] || ActorProxy).new(self)