lib/celluloid/actor/system.rb in celluloid-0.18.0.pre vs lib/celluloid/actor/system.rb in celluloid-0.18.0.pre2

- old
+ new

@@ -5,37 +5,22 @@ class Actor class System extend Forwardable def_delegators :@registry, :[], :get, :[]=, :set, :delete - ROOT_SERVICES = begin - root_services = [ - { - as: :notifications_fanout, - type: Celluloid::Notifications::Fanout, - }, - { - as: :incident_reporter, - type: Celluloid::IncidentReporter, - args: [STDERR], - }, - { - as: :public_services, - type: Celluloid::Supervision::Service::Public, - accessors: [:services], - supervise: [], - }, - ] - if $CELLULOID_MANAGED - root_services << { - as: :actor_manager, - type: Celluloid::Actor::Manager, - accessors: [:manager], - } - end - root_services - end + ROOT_SERVICES = [ + { + as: :notifications_fanout, + type: Celluloid::Notifications::Fanout + }, + { + as: :public_services, + type: Celluloid::Supervision::Service::Public, + accessors: [:services], + supervise: [] + } + ].freeze attr_reader :registry, :group # the root of the supervisor tree is established at supervision/root @@ -57,11 +42,10 @@ # Launch default services def start within do @root = Supervision::Service::Root.define @tree = root_configuration.deploy - # de root_services[:group_manager].manage! @group end true end def within @@ -117,10 +101,10 @@ # Shut down all running actors def shutdown actors = running Timeout.timeout(shutdown_timeout) do - Internals::Logger.debug "Terminating #{actors.size} #{(actors.size > 1) ? 'actors' : 'actor'}..." if actors.size > 0 + Internals::Logger.debug "Terminating #{actors.size} #{actors.size > 1 ? 'actors' : 'actor'}..." unless actors.empty? # Actors cannot self-terminate, you must do it for them actors.each do |actor| begin actor.terminate!