|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
SignalConsumer — JSON serialisation thread for relativistic signals. More...
#include "spsc_ring.hpp"#include "stream_signal.hpp"#include <atomic>#include <cstdint>#include <cstdio>#include <thread>Go to the source code of this file.
Classes | |
| struct | srfm::stream::SignalConsumerCounters |
| Diagnostic counters for the signal consumer thread. More... | |
| class | srfm::stream::SignalConsumer |
| JSON output thread owner. Non-copyable, non-movable. More... | |
Namespaces | |
| namespace | srfm |
| namespace | srfm::stream |
SignalConsumer — JSON serialisation thread for relativistic signals.
Module: include/srfm/stream/ Owner: AGT-10 (Builder) — 2026-03-01
Pop StreamRelativisticSignal objects from the output ring and write one JSON line per signal to a configurable output stream (default: stdout). Flush the output every FLUSH_INTERVAL signals to amortise syscall cost.
Output format (one line per signal):
• Batched I/O: flushes every FLUSH_INTERVAL (default 100) signals, not per signal. • Non-throwing: the serialisation loop never throws. • Final flush: stop() performs a final flush before joining the thread. • Configurable sink: constructor accepts any FILE* for testability.
• Signal computation (SignalProcessor) • Routing or fanout (one sink only)
Definition in file signal_consumer.hpp.