|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
TickIngester implementation — ingestion thread body. More...
Go to the source code of this file.
Namespaces | |
| namespace | srfm |
| namespace | srfm::stream |
TickIngester implementation — ingestion thread body.
See include/srfm/stream/tick_ingester.hpp for the full module contract.
The inner loop in run_loop() is:
All operations are noexcept. No heap allocation occurs in the loop.
When source_.read() returns nullopt (no data available), we call std::this_thread::yield() to be cooperative with the OS scheduler rather than burning a core in a tight spin. A more aggressive variant could use _mm_pause() on x86 or std::this_thread::sleep_for(0ns), but yield() gives a reasonable balance between latency and CPU utilisation for this use-case.
Definition in file tick_ingester.cpp.