post_ack_agent
post_ack_agent
is the consumer class of post-ack. It can asynchronously poll
for a value produced by the observed post_ack_mechanism.
Prototype
template <typename T>
struct post_ack_agent {
void attach(post_ack_mechanism<T> *mech); // (1)
void detach(); // (2)
sender poll(cancellation_token ct = {}); // (3)
};
- Attach the agent (consumer) to a mechanism (producer).
- Detach the agent from the mechanism.
- Asynchronously poll for a value.
Requirements
T
is moveable.
Arguments
mech
- the mechanism to attach to.ct
- the cancellation token to use.
Return values
- This method doesn't return any value.
- This method doesn't return any value.
- This method returns a sender of unspecified type. The sender returns a value
of type
post_ack_handle<T>
.