lib/celluloid/group.rb in celluloid-0.17.0 vs lib/celluloid/group.rb in celluloid-0.17.1
- old
+ new
@@ -1,29 +1,25 @@
module Celluloid
class Group
- class NotImplemented < StandardError; end
- class StillActive < StandardError; end
- class NotActive < StandardError; end
-
attr_accessor :group
def initialize
@mutex = Mutex.new
@group = []
@running = true
end
def assert_active
- fail NotActive unless active?
+ fail Celluloid::NotActive unless active?
end
def assert_inactive
return unless active?
if RUBY_PLATFORM == "java"
Celluloid.logger.warn "Group is still active"
else
- fail StillActive
+ fail Celluloid::StillActive
end
end
def each
to_a.each { |thread| yield thread }
@@ -49,17 +45,17 @@
def active?
@running
end
def get
- fail NotImplemented
+ fail NotImplementedError
end
def create
- fail NotImplemented
+ fail NotImplementedError
end
def shutdown
- fail NotImplemented
+ fail NotImplementedError
end
end
end