lib/dcell/celluloid_ext.rb in dcell-0.16.0 vs lib/dcell/celluloid_ext.rb in dcell-0.16.1
- old
+ new
@@ -7,11 +7,11 @@
# marshalling to mailboxes so that if they're unserialized on a remote
# node you instead get a proxy object that routes messages through the
# DCell overlay network back to the node where the actor actually exists
module Celluloid
- class ActorProxy
+ class CellProxy
# Marshal uses respond_to? to determine if this object supports _dump so
# unfortunately we have to monkeypatch in _dump support as the proxy
# itself normally jacks respond_to? and proxies to the actor
alias_method :__respond_to?, :respond_to?
def respond_to?(meth, check_private = false)
@@ -31,14 +31,15 @@
mailbox = ::Celluloid::Mailbox._load(string)
case mailbox
when ::DCell::MailboxProxy
actor = ::DCell::Actor.new(mailbox)
- ::DCell::ActorProxy.new actor, mailbox
+ ::DCell::CellProxy.new actor.proxy, mailbox, actor.subject.class.to_s
when ::Celluloid::Mailbox
actor = find_actor(mailbox)
- ::Celluloid::ActorProxy.new(actor)
- else ::Kernel.raise "funny, I did not expect to see a #{mailbox.class} here"
+ ::Celluloid::CellProxy.new actor.proxy, mailbox, actor.behavior.subject.class.to_s
+ else
+ ::Kernel.raise "funny, I did not expect to see a #{mailbox.class} here"
end
end
def self.find_actor(mailbox)
::Thread.list.each do |t|