lib/celluloid.rb in celluloid-0.15.1 vs lib/celluloid.rb in celluloid-0.15.2
- old
+ new
@@ -6,11 +6,11 @@
if defined?(JRUBY_VERSION) && JRUBY_VERSION == "1.7.3"
raise "Celluloid is broken on JRuby 1.7.3. Please upgrade to 1.7.4+"
end
module Celluloid
- VERSION = '0.15.1'
+ VERSION = '0.15.2'
Error = Class.new StandardError
extend self # expose all instance methods as singleton methods
# Warning message added to Celluloid objects accessed outside their actors
@@ -114,10 +114,14 @@
def start
Celluloid::Notifications::Fanout.supervise_as :notifications_fanout
Celluloid::IncidentReporter.supervise_as :default_incident_reporter, STDERR
end
+ def running?
+ internal_pool
+ end
+
def register_shutdown
return if @shutdown_registered
# Terminate all actors at exit
at_exit do
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" && RUBY_VERSION >= "1.9"
@@ -508,7 +512,10 @@
# Configure default systemwide settings
Celluloid.task_class = Celluloid::TaskFiber
Celluloid.logger = Logger.new(STDERR)
Celluloid.shutdown_timeout = 10
-Celluloid.register_shutdown
-Celluloid.init
+
+unless $CELLULOID_TEST
+ Celluloid.register_shutdown
+ Celluloid.init
+end