class
Movie::ExecutorExtension
- Movie::ExecutorExtension
- Movie::Extension
- Reference
- Object
Overview
Generic executor extension — runs arbitrary tasks on a bounded pool of workers.
Defined in:
movie/executor.crConstructors
Instance Method Summary
-
#execute(timeout : Time::Span | Nil = nil, &block : -> T) : Future(T) forall T
Execute a block and return a Future (existing API).
-
#execute_with_reply(reply_to : ActorRef(TaskReply(T)), timeout : Time::Span | Nil = nil, &block : -> T) : Nil forall T
Execute a block and send the result back to a specific actor via a message.
-
#start
Called when the extension is registered with the system.
-
#stop
Called when the system is shutting down.
Constructor Detail
Instance Method Detail
Execute a block and return a Future (existing API).
def execute_with_reply(reply_to : ActorRef(TaskReply(T)), timeout : Time::Span | Nil = nil, &block : -> T) : Nil forall T
#
Execute a block and send the result back to a specific actor via a message.
def start
#
Description copied from class Movie::Extension
Called when the extension is registered with the system. Override to perform initialization.
def stop
#
Description copied from class Movie::Extension
Called when the system is shutting down. Override to cleanup resources (close connections, stop services, etc.)