AbstractProxy
A proxy which sends asynchronous calls to an actor
# File lib/celluloid/proxies/async_proxy.rb, line 10 def inspect "#<Celluloid::AsyncProxy(#{@klass})>" end
# File lib/celluloid/proxies/async_proxy.rb, line 14 def method_missing(meth, *args, &block) if @mailbox == ::Thread.current[:celluloid_mailbox] args.unshift meth meth = :__send__ end if block_given? # FIXME: nicer exception raise "Cannot use blocks with async yet" end begin @mailbox << AsyncCall.new(meth, args, block) rescue MailboxError # Silently swallow asynchronous calls to dead actors. There's no way # to reliably generate DeadActorErrors for async calls, so users of # async calls should find other ways to deal with actors dying # during an async call (i.e. linking/supervisors) end end
Generated with the Darkfish Rdoc Generator 2.