libxr 1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
condition_var.hpp
1#pragma once
2
3#include "libxr_def.hpp"
4#include "libxr_system.hpp"
5
6namespace LibXR
7{
8
20{
21 private:
24
25 public:
33
41
53 ErrorCode Wait(uint32_t timeout);
54
62 void Signal();
63
71 void Broadcast();
72};
73
74} // namespace LibXR
条件变量封装类 / Condition variable wrapper class
condition_var_handle handle_
底层条件变量句柄 / Underlying condition variable handle
ErrorCode Wait(uint32_t timeout)
等待条件变量 / Waits for the condition variable
void Broadcast()
广播信号唤醒所有等待线程 / Broadcasts a signal to wake up all waiting threads
~ConditionVar()
析构函数 / Destructor
ConditionVar()
默认构造函数 / Default constructor
void Signal()
发送信号唤醒一个等待线程 / Signals one waiting thread
LibXR Color Control Library / LibXR终端颜色控制库
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值
条件变量结构体定义,包含互斥锁和条件变量 Condition variable structure definition including a mutex and a condition variab...