#include <userver/engine/pulse_event.hpp>
A one-shot subscription from PulseEvent::Subscribe.
Satisfies engine::Awaitable, for use with engine::WaitAnyContext and friends.
Example. A parent task publishes two atomic config fields and wakes all consumers. Each consumer assembles a Config and passes it to ApplyConfig.
Initialization:
Publisher side:
Consumer side:
Definition at line 41 of file pulse_event.hpp.
Public Member Functions | |
| PulseEventSubscription (const PulseEventSubscription &)=delete | |
| PulseEventSubscription (PulseEventSubscription &&other) noexcept | |
| PulseEventSubscription & | operator= (const PulseEventSubscription &)=delete |
| PulseEventSubscription & | operator= (PulseEventSubscription &&other) noexcept |
| bool | IsValid () const noexcept |
| bool | IsReady () const noexcept override |
| FutureStatus | WaitUntil (Deadline) |
| Waits until a concurrent PulseEvent::Send satisfies this subscription, or the deadline expires, or the current task is cancelled. | |
| AwaitableToken | GetAwaitableToken () noexcept |
| Satisfies engine::Awaitable, for use with engine::WaitAnyContext and friends. | |
|
nodiscardoverridenoexcept |
|
nodiscardnoexcept |
|
friend |
Definition at line 64 of file pulse_event.hpp.