Skip to main content

Module runner

Module runner 

Source
Expand description

Global runtime machinery and thread-local storage.

This module provides global access to shared runtime resources including clocks, message queues, and time event channels. It manages thread-local storage for system-wide components that need to be accessible across threads.

Structs§

SyncDataCommandSender
Synchronous DataCommandSender for backtest environments.
SyncTradingCommandSender
Synchronous TradingCommandSender for backtest environments.

Traits§

DataCommandSender
Trait for data command sending that can be implemented for both sync and async runners.
TimeEventSender
Trait for time event sending that can be implemented for both sync and async runners.
TradingCommandSender
Trait for trading command sending that can be implemented for both sync and async runners.

Functions§

data_cmd_queue_is_empty
Returns true if the data command queue is empty.
drain_data_cmd_queue
Drain all buffered data commands, dispatching each to the data engine.
drain_trading_cmd_queue
Drain all buffered trading commands, dispatching each to the exec engine.
get_data_cmd_sender
Gets the global data command sender.
get_time_event_sender
Gets the global time event sender.
get_trading_cmd_sender
Gets the global trading command sender.
init_data_cmd_sender
Sets the global data command sender if not already set (idempotent).
init_exec_cmd_sender
Sets the global trading command sender if not already set (idempotent).
set_data_cmd_sender
Sets the global data command sender.
set_exec_cmd_sender
Sets the global trading command sender.
set_time_event_sender
Sets the global time event sender.
trading_cmd_queue_is_empty
Returns true if the trading command queue is empty.
try_get_time_event_sender
Attempts to get the global time event sender without panicking.
try_get_trading_cmd_sender
Attempts to get the global trading command sender without panicking.