VLink  2.3.0
A high-performance communication middleware
vlink::MessageLoop::AliveState Struct Referencefinal

Lifetime gate shared with cross-thread observers. More...

#include <message_loop.h>

Collaboration diagram for vlink::MessageLoop::AliveState:

Public Attributes

std::shared_mutex mtx
 
std::atomic_bool alive {true}
 

Detailed Description

Lifetime gate shared with cross-thread observers.

Callers hold a shared lock on mtx while accessing the loop. Destruction first wakes blocked producers, then takes the exclusive lock and clears alive before releasing resources. During Windows process termination, when all other threads have already stopped, the destructor performs only the atomic store. Obtain via get_alive_state.

Member Data Documentation

◆ alive

std::atomic_bool vlink::MessageLoop::AliveState::alive {true}

◆ mtx

std::shared_mutex vlink::MessageLoop::AliveState::mtx

The documentation for this struct was generated from the following file: