WriteReservation
WriteReservation
Thread-safe accumulation buffer for progressive result delivery. More…
#include <WriteReservation.hpp>
Public Functions
| Name | |
|---|---|
| void | push(std::vector< FrameResult > results) Push decoded results from the worker thread. |
| std::vector< FrameResult > | drain() Drain all pending results (called from main thread). |
| bool | hasPending() const Check if there are pending results without draining. |
Detailed Description
class WriteReservation;Thread-safe accumulation buffer for progressive result delivery.
The worker thread calls push() after decoding each frame’s outputs. The main thread calls drain() on a timer to move accumulated results into DataManager in bulk.
Public Functions Documentation
function push
inline void push(
std::vector< FrameResult > results
)Push decoded results from the worker thread.
Parameters:
- results Decoded outputs for one frame (may contain multiple bindings)
function drain
inline std::vector< FrameResult > drain()Drain all pending results (called from main thread).
Return: An empty vector if nothing is pending.
function hasPending
inline bool hasPending() constCheck if there are pending results without draining.
Updated on 2026-11-13 at 20:25:39 +0000