Like std::atomic, but without the std::memory_order parameters on any member function.

Synopsis

Declared in <folly/synchronization/RelaxedAtomic.h>

template<typename T>
struct relaxed_atomic;

Description

All operations use std::memory_order_relaxed rather than the std::memory_order_seq_cst default of std::atomic. Useful for values that may be loaded and stored concurrently, such as counters, but which do not guard any associated data.

Type Aliases

Name

value_type

Member Functions

Using Declarations

Specializations

Deduction Guides

Name

Description

relaxed_atomic<T>

Deduces the value type of a relaxed_atomic from its initializer.

Created with MrDocs