Raxol.Agent.Directive.Async (Raxol Agent v2.6.0)

Copy Markdown View Source

Spawn a task with a sender callback. The function receives a sender/1 closure that can be invoked multiple times to send messages back to the TEA loop as {:command_result, msg}.

Exceptions inside the function are caught and sent back as {:command_result, {:async_error, message}}.

Summary

Types

sender()

@type sender() :: (term() -> :ok)

t()

@type t() :: %Raxol.Agent.Directive.Async{fun: (sender() -> any())}