Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Namespaces
stream_engine.cpp File Reference

StreamEngine implementation — pipeline lifecycle and inject() path. More...

#include "../../include/srfm/engine/stream_engine.hpp"

Go to the source code of this file.

Namespaces

namespace  srfm
 
namespace  srfm::engine
 

Detailed Description

StreamEngine implementation — pipeline lifecycle and inject() path.

See include/srfm/engine/stream_engine.hpp for the full module contract.

Startup / shutdown order

start() launches threads in data-flow order:

  1. TickIngester (produces to Ring1)
  2. SignalProcessor (consumes Ring1, produces Ring2)
  3. SignalConsumer (consumes Ring2)

stop() signals threads in the same order and joins them. This ensures in-flight ticks are processed before the downstream consumers exit.

inject() path

inject() validates the tick (tick_is_valid) and pushes directly into Ring1. It does not interact with the TickIngester's loop or its counters — it is a separate producer path intended for tests.

When the TickIngester is also running with a live TickSource, the caller MUST NOT mix inject() calls with TickSource production (SPSC constraint: only one producer thread at a time).

Definition in file stream_engine.cpp.