Exemple #1
0
/**
 * @brief Sends @p what as a synchronous message to @p whom.
 * @param whom Receiver of the message.
 * @param what Message content as tuple.
 * @returns A handle identifying a future to the response of @p whom.
 * @warning The returned handle is actor specific and the response to the sent
 *          message cannot be received by another actor.
 * @throws std::invalid_argument if <tt>whom == nullptr</tt>
 */
inline message_future sync_send_tuple(const actor_ptr& whom, any_tuple what) {
    if (whom) return self->send_sync_message(whom.get(), std::move(what));
    else throw std::invalid_argument("whom == nullptr");
}
Exemple #2
0
inline typename std::enable_if<std::is_base_of<channel, C>::value>::type
send_tuple_as(const actor_ptr& from, const intrusive_ptr<C>& whom, any_tuple what) {
    if (whom) whom->enqueue(from.get(), std::move(what));
}