C++ Actor Framework 1.0.0
|
A requester
is an actor that supports self->request(...).
More...
#include <requester.hpp>
Inherits Base.
Public Types | |
using | extended_base = requester |
Public Member Functions | |
template<message_priority P = message_priority::normal, class Rep = int, class Period = std::ratio<1>, class Handle = actor, class... Ts> | |
auto | request (const Handle &dest, std::chrono::duration< Rep, Period > timeout, Ts &&... xs) |
Sends {xs...} as a synchronous message to dest with priority mp . | |
template<template< class > class MergePolicy, message_priority Prio = message_priority::normal, class Rep = int, class Period = std::ratio<1>, class Container , class... Ts> | |
auto | fan_out_request (const Container &destinations, std::chrono::duration< Rep, Period > timeout, Ts &&... xs) |
Sends {xs...} to each actor in the range destinations as a synchronous message. | |
A requester
is an actor that supports self->request(...).
{then|await|receive}.
auto caf::mixin::requester< Base, Subtype >::fan_out_request | ( | const Container & | destinations, |
std::chrono::duration< Rep, Period > | timeout, | ||
Ts &&... | xs ) |
Sends {xs...}
to each actor in the range destinations
as a synchronous message.
Response messages get combined into a single result according to the MergePolicy
.
MergePolicy | Configures how individual response messages get combined by the actor. The policy makes sure that the response handler gets invoked at most once. In case of one or more errors, the policy calls the error handler exactly once, with the first error occurred. |
Prio | Specifies the priority of the synchronous messages. |
Container | A container type for holding actor handles. Must provide the type alias value_type as well as the member functions begin() , end() , and size() . |
destinations | A container holding handles to all destination actors. |
timeout | Maximum duration before dropping the request. The runtime system will send an error message to the actor in case the receiver does not respond in time. |
.await()
, .then()
, or .receive()
. request
can use it for setting response handlers. auto caf::mixin::requester< Base, Subtype >::request | ( | const Handle & | dest, |
std::chrono::duration< Rep, Period > | timeout, | ||
Ts &&... | xs ) |
Sends {xs...}
as a synchronous message to dest
with priority mp
.