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.
我有一个场景,SRWLock 与条件变量结合使用,std::atomic_flag 都可以满足我的需求。如果性能受到关注,是否有任何理由更喜欢其中一个?我有两个线程在共享资源上读取和写入数据,所以我目前使用 SRWLock 获取排他锁。