Sha256: 18c6a25ebe7d541fcdeb3507e61c2fc1df9553e07360a1075bd3b931f9fae40b
Contents?: true
Size: 491 Bytes
Versions: 10
Compression:
Stored size: 491 Bytes
Contents
module Celluloid # A proxy which sends asynchronous calls to an actor class AsyncProxy < AbstractProxy attr_reader :mailbox def initialize(actor) @mailbox, @klass = actor.mailbox, actor.subject.class.to_s end def inspect "#<Celluloid::AsyncProxy(#{@klass})>" end # method_missing black magic to call bang predicate methods asynchronously def method_missing(meth, *args, &block) Actor.async @mailbox, meth, *args, &block end end end
Version data entries
10 entries across 10 versions & 1 rubygems