Ingestion thread owner. Non-copyable, non-movable.
More...
#include <tick_ingester.hpp>
|
| static constexpr std::size_t | RING_SIZE = 65536 |
| |
Ingestion thread owner. Non-copyable, non-movable.
QueueTickSource src;
ingester.start();
src.
push(make_valid_tick());
ingester.stop();
Lock-free single-producer / single-consumer ring buffer.
bool push(T &&item) noexcept
Try to enqueue one element.
Ingestion thread owner. Non-copyable, non-movable.
Definition at line 69 of file tick_ingester.hpp.
◆ Ring
◆ TickIngester() [1/3]
| srfm::stream::TickIngester::TickIngester |
( |
TickSource & |
source, |
|
|
Ring & |
ring |
|
) |
| |
|
inlinenoexcept |
Construct bound to a source and a ring buffer.
Both source and ring must outlive this TickIngester.
- Parameters
-
| source | Tick source to read from (non-owning reference). |
| ring | Ring buffer to push valid ticks into (non-owning reference). |
Definition at line 82 of file tick_ingester.hpp.
◆ ~TickIngester()
| srfm::stream::TickIngester::~TickIngester |
( |
| ) |
|
|
inlinenoexcept |
Destructor: ensures the thread is stopped and joined.
Definition at line 87 of file tick_ingester.hpp.
◆ TickIngester() [2/3]
| srfm::stream::TickIngester::TickIngester |
( |
const TickIngester & |
| ) |
|
|
delete |
◆ TickIngester() [3/3]
| srfm::stream::TickIngester::TickIngester |
( |
TickIngester && |
| ) |
|
|
delete |
◆ counters()
Snapshot of ingestion counters.
Non-atomic read — approximate under concurrency. Safe for monitoring.
Definition at line 123 of file tick_ingester.hpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ running()
| bool srfm::stream::TickIngester::running |
( |
| ) |
const |
|
inlinenoexcept |
Whether the ingestion thread is currently running.
Definition at line 112 of file tick_ingester.hpp.
◆ start()
| void srfm::stream::TickIngester::start |
( |
| ) |
|
|
noexcept |
Launch the ingestion thread.
Idempotent: a second call while running is a no-op.
Definition at line 36 of file tick_ingester.cpp.
◆ stop()
| void srfm::stream::TickIngester::stop |
( |
| ) |
|
|
noexcept |
Signal the ingestion thread to stop and wait for it to finish.
Idempotent: safe to call multiple times.
Definition at line 48 of file tick_ingester.cpp.
◆ RING_SIZE
| constexpr std::size_t srfm::stream::TickIngester::RING_SIZE = 65536 |
|
staticconstexpr |
The documentation for this class was generated from the following files: