ask

Sends a message to a specified actor address and waits for a response, ensuring the response corresponds to the sent request.

Return

A Result containing the Response received in reply, or an error if the operation fails.

Parameters

addr

The address of the target actor to which the message should be sent.

msg

The message to deliver to the target actor.

Throws

if the response ID does not match the request ID.