shared_spin_mutex:共享自旋互斥锁

时间:2021-04-21 00:25:22
【文件属性】:
文件名称:shared_spin_mutex:共享自旋互斥锁
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-21 00:25:22
C++ shared_spin_lock 它比boost::shared_mutex快。 lock_shared非常贪婪,因此等待lock时间是不公平的。 这应该没有问题,因为此互斥对象适用于被动写入器-主动读取器方案。 最好情况下, lock_shared只是一个fetch_add 。 在最佳情况下, lock只是一个compare_exchange_weak 。
【文件预览】:
shared_spin_mutex-main
----shared_spin_mutex-config.cmake.in(189B)
----CMakeLists.txt(2KB)
----test()
--------main.cpp(6KB)
----README.md(350B)
----.gitignore(0B)
----include()
--------shared_spin_mutex.hpp(3KB)

网友评论