module Movie::Ask

Defined in:

movie/ask.cr

Class Method Summary

Class Method Detail

def self.cancel(sender : ActorRefBase | Nil, response_type : T.class) forall T #

[View source]
def self.cancel_dynamic_if_asked(sender : ActorRefBase | Nil) : Nil #

[View source]
def self.fail_dynamic_if_asked(sender : ActorRefBase | Nil, error : Exception) : Nil #

[View source]
def self.fail_if_asked(sender : ActorRefBase | Nil, error : Exception, response_type : T.class) forall T #

Best-effort failure reply that only responds when the sender is an ask endpoint.


[View source]
def self.failure(sender : ActorRefBase | Nil, error : Exception, response_type : T.class) forall T #

[View source]
def self.local(system : AbstractActorSystem, target : ActorRef(M), message : M, response_type : R.class = Nil, timeout : Time::Span | Nil = nil) : Future(R) forall M, R #

Creates a local ask without spawning a temporary actor.


[View source]
def self.reply_if_asked(sender : ActorRefBase | Nil, value : T) forall T #

Best-effort reply that only responds when the sender is an ask endpoint.


[View source]
def self.reply_serializable_if_asked(sender : ActorRefBase | Nil, value : JSON::Serializable) : Nil #

[View source]
def self.success(sender : ActorRefBase | Nil, value : T) forall T #

[View source]