lib/celluloid.rb in celluloid-0.12.0.pre vs lib/celluloid.rb in celluloid-0.12.0.pre2
- old
+ new
@@ -131,14 +131,19 @@
# Configure a custom mailbox factory
def use_mailbox(klass = nil, &block)
if block
@mailbox_factory = block
else
- @mailbox_factory = proc { klass.new }
+ mailbox_class(klass)
end
end
+ # Define the mailbox class for this class
+ def mailbox_class(klass)
+ @mailbox_factory = proc { klass.new }
+ end
+
# Define the default task type for this class
def task_class(klass)
@task_class = klass
end
@@ -164,14 +169,14 @@
end
# Configuration options for Actor#new
def actor_options
{
- :mailbox => mailbox_factory,
- :exit_handler => @exit_handler,
+ :mailbox => mailbox_factory,
+ :exit_handler => @exit_handler,
:exclusive_methods => @exclusive_methods,
- :task_class => @task_class,
+ :task_class => @task_class
}
end
def ===(other)
other.kind_of? self
@@ -368,11 +373,11 @@
Actor.future Thread.current[:actor].mailbox, meth, *args, &block
end
end
require 'celluloid/version'
-require 'celluloid/actor_proxy'
+
require 'celluloid/calls'
require 'celluloid/core_ext'
require 'celluloid/cpu_counter'
require 'celluloid/fiber'
require 'celluloid/fsm'
@@ -387,9 +392,14 @@
require 'celluloid/signals'
require 'celluloid/system_events'
require 'celluloid/task'
require 'celluloid/thread_handle'
require 'celluloid/uuid'
+
+require 'celluloid/proxies/abstract_proxy'
+require 'celluloid/proxies/actor_proxy'
+require 'celluloid/proxies/async_proxy'
+require 'celluloid/proxies/future_proxy'
require 'celluloid/actor'
require 'celluloid/future'
require 'celluloid/pool_manager'
require 'celluloid/supervision_group'