Sha256: 77b5eaa858542c31ebd7c2f85e19e1509f50352557ae6ac577d235dc2ecacd08

Contents?: true

Size: 782 Bytes

Versions: 1

Compression:

Stored size: 782 Bytes

Contents

# Things to run after Celluloid is fully loaded

# Configure default systemwide settings
Celluloid.task_class = Celluloid::TaskFiber
Celluloid.logger     = Logger.new(STDERR)

# Launch default services
# FIXME: We should set up the supervision hierarchy here
Celluloid::Notifications::Fanout.supervise_as :notifications_fanout
Celluloid::IncidentReporter.supervise_as :default_incident_reporter, STDERR

# Terminate all actors at exit
at_exit do
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" && RUBY_VERSION >= "1.9"
    # workaround for MRI bug losing exit status in at_exit block
    # http://bugs.ruby-lang.org/issues/5218
    exit_status = $!.status if $!.is_a?(SystemExit)
    Celluloid.shutdown
    exit exit_status if exit_status
  else
    Celluloid.shutdown
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
celluloid-0.13.0.pre lib/celluloid/boot.rb