userver: userver/utils/atomic.hpp File Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
atomic.hpp File Reference

Your opinion will help to improve our service

Leave a feedback >

Detailed Description

Helper algorithms to work with atomics.

Definition in file atomic.hpp.

Go to the source code of this file.

#include <atomic>
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename T, typename Func>
utils::AtomicUpdate (std::atomic< T > &atomic, Func updater)
 Atomically performs the operation of updater on atomic
 
template<typename T>
utils::AtomicMin (std::atomic< T > &atomic, T value)
 Concurrently safe sets atomic to a value if value is less.
 
template<typename T>
utils::AtomicMax (std::atomic< T > &atomic, T value)
 Concurrently safe sets atomic to a value if value is greater.