NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
semaphore.hpp 文件参考

信号量支持 更多...

#include "atomic_base.hpp"
#include "atomic_timed_wait.hpp"
semaphore.hpp 的引用(Include)关系图:

浏览该文件的源代码.

class  atomic_semaphore< LeastMaxValue >
 原子信号量类模板 更多...
class  semaphore
 系统信号量类 更多...

类型定义

using binary_semaphore = atomic_semaphore<1>
 二元信号量

详细描述

信号量支持

此文件提供了信号量的实现,用于控制对共享资源的并发访问。 包含两种信号量类型:

  • counting_semaphore: 轻量级计数信号量,基于原子操作和等待机制
  • semaphore: 系统级信号量,基于操作系统API

在文件 semaphore.hpp 中定义.