lib/celluloid/pool_manager.rb in celluloid-0.12.3 vs lib/celluloid/pool_manager.rb in celluloid-0.12.4.pre
- old
+ new
@@ -78,15 +78,23 @@
def size
@size
end
+ def busy_size
+ @busy.length
+ end
+
+ def idle_size
+ @idle.length
+ end
+
# Provision a new worker
def __provision_worker
while @idle.empty?
# Wait for responses from one of the busy workers
response = exclusive { receive { |msg| msg.is_a?(Response) } }
- Thread.current[:actor].handle_message(response)
+ Thread.current[:celluloid_actor].handle_message(response)
end
worker = @idle.shift
@busy << worker