Permalink
Browse files

[BUGFIX] Make pool size accessible

  • Loading branch information...
1 parent 3e5ea72 commit 1efd8d5ccb9dcd38c6412b0a8be6c4ab68d8bf3d @benlangfeld committed Sep 16, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −0 lib/celluloid/pool_manager.rb
  2. +1 −1 spec/celluloid/supervision_group_spec.rb
View
4 lib/celluloid/pool_manager.rb
@@ -76,6 +76,10 @@ def inspect
_send_ :inspect
end
+ def size
+ @size
+ end
+
# Provision a new worker
def __provision_worker
while @idle.empty?
View
2 spec/celluloid/supervision_group_spec.rb
@@ -39,7 +39,7 @@ class MyGroup
Celluloid::Actor[:example_pool].should be_running
Celluloid::Actor[:example_pool].args.should == ['foo']
- Celluloid::Actor[:example_pool].instance_variable_get("@size").should == 3
+ Celluloid::Actor[:example_pool].size.should == 3
end
end
end

0 comments on commit 1efd8d5

Please sign in to comment.