Share via


atomic_init Function

Sets the stored value in an atomic object.

template <class Ty>
inline void atomic_init(
   volatile atomic<Ty> *Atom,
   Ty Value
) _NOEXCEPT;
template <class Ty>
inline void atomic_init(
   atomic<Ty> *Atom,
   TyValue
) _NOEXCEPT;

Parameters

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

  • Value
    A value of type Ty.

Remarks

atomic_init is not an atomic operation. It is not thread-safe.

Requirements

Header: atomic

Namespace: std

See Also

Reference

<atomic>

atomic Structure