Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
boost或std STL中是否存在任何类,它利用原子指令并实现仅在用户空间中运行的同步锁?我确信线程将通过这种实现连续旋转以获取锁,但这对我的用例来说很好。这样的示例实现之一是here。但这是非常简单的锁,只允许一个读者或一个写者。我期望应该允许使用单个写入器或多个读取器实现锁定。