userver: userver/utils/atomic.hpp File Reference
Loading...
Searching...
No Matches
atomic.hpp File Reference

Detailed Description

Helper algorithms to work with atomics.

Definition in file atomic.hpp.

Go to the source code of this file.

#include <atomic>
+ Include dependency graph for atomic.hpp:
+ 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.