VLink  2.0.0
A high-performance communication middleware
vlink::MessageLoop::AliveState结构体 参考final

Lifetime gate shared with cross-thread observers. 更多...

#include <message_loop.h>

vlink::MessageLoop::AliveState 的协作图:

Public 属性

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

详细描述

Lifetime gate shared with cross-thread observers.

The destructor of MessageLoop flips alive to false under mtx as its very first step, so a caller that holds mtx and observes alive == true is guaranteed the loop is still safe to touch. Obtain via get_alive_state.

类成员变量说明

◆ alive

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

◆ mtx

std::mutex vlink::MessageLoop::AliveState::mtx

该结构体的文档由以下文件生成: