共用方式為


atomic_is_lock_free Function

Specifies whether atomic operations on an atomic object are lock-free.

template <class Ty>
inline bool atomic_is_lock_free(
   const volatile atomic<Ty> *Atom
) _NOEXCEPT;
template <class Ty>
inline bool atomic_is_lock_free(
   const atomic<Ty> *Atom
) _NOEXCEPT;

Parameters

  • Atom
    A pointer to an atomic object that stores a value of type Ty.

Return Value

true if atomic operations on Atom are lock-free; otherwise, false.

Remarks

An atomic type is lock-free if no atomic operations on that type use locks.

Requirements

Header: atomic

Namespace: std

See Also

Reference

<atomic>

atomic Structure