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.

Parameters

none

Return value

true if the object is lock-free.

Data races

No data races are initiated by calling this member function.

Exception safety

No-throw guarantee: never throws exceptions.

See also