Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::atomic_shared_ptr >> std::experimental::atomic_shared_ptr::is_lock_free member function

Determine if operations on *this are lock free.

Instances of std::experimental::atomic_shared_ptr are lock-free if the target CPU supports double-word-compare-and-swap. This is true for all supported 32-bit CPUs, and for 64-bit CPUs that support the CMPXCHG16B instruction. This determination is done at runtime, since it depends on the model of the CPU rather than the OS or compiler.

bool is_lock_free() const noexcept;

Returns:

true if operations on *this are lock free, false otherwise.

Throws:

Nothing.

Header

#include <experimental/atomic>

See Also