首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::shared_mutex::unlock_shared

void unlock_shared();

?

(since C++17)

通过调用线程从共享所有权中释放互斥对象。互斥锁必须以共享模式由当前执行线程锁定,否则行为不定义。

这次行动同步性中定义的28名ASstd::memory_order%29任何后续lock()获取同一个互斥对象所有权的操作。

参数

%280%29

返回值

%280%29

例外

%280%29

注记

unlock_shared()通常不直接调用:std::shared_lock用于管理独占锁定。

另见

lock_shared

locks the mutex for shared ownership, blocks if the mutex is not available (public member function)

unlock

unlocks the mutex (public member function)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com