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

std::atomic::is_always_lock_free

static constexpr bool is_always_lock_free = /*implementation-defined*/;

?

(since C++17)

等号true如果这个原子类型始终是无锁的,并且false如果它从来没有或者有时是没有锁的。

此常量的值与两个宏一致。ATOMIC_xxx_LOCK_FREE,在定义的情况下,使用成员函数。is_lock_free非成员函数std::atomic_is_lock_free...

注记

不存在与此静态成员常量等效的非成员函数,因为非成员函数接受指向原子类型的指针,因此在常数表达式...

另见

is_lock_free

checks if the atomic object is lock-free (public member function)

atomic_is_lock_free (C++11)

checks if the atomic type's operations are lock-free (function template)

is_always_lock_free static

indicates that the type is always lock-free (public static member constant)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com