Function get_message_bus

Source
pub fn get_message_bus() -> Rc<RefCell<MessageBus>>
Expand description

Gets the thread-local message bus.

If no message bus has been set for this thread, a default one is created and initialized. This ensures each thread gets its own MessageBus instance, preventing data races while maintaining the singleton pattern that the codebase expects.