public member function
<atomic>

std::atomic::is_lock_free

bool is_lock_free() const volatile noexcept;bool is_lock_free() const noexcept;
Is lock-free
Indicates whether the object is lock-free.

A lock-free object does not cause other threads to be blocked when accessed (possibly using some sort of transactional memory for the type).

The value returned by this function is consistent with the values returned for all other objects of the same type.

参数



返回值

true if the object is lock-free.

数据竞争

No data races are initiated by calling this member function.

异常安全

无异常保证: 绝不抛出异常。

另见