class Celluloid::Proxy::Async
A proxy which sends asynchronous calls to an actor
Public Instance Methods
method_missing(meth, *args, &block)
click to toggle source
# File lib/celluloid/proxy/async.rb, line 3 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 @mailbox << ::Celluloid::Call::Async.new(meth, args, block) self end