Helper algorithms to work with atomics.
Definition in file atomic.hpp.
Go to the source code of this file.
#include <atomic>
Namespaces | |
namespace | utils |
Utilities. | |
Functions | |
template<typename T , typename Func > | |
T | utils::AtomicUpdate (std::atomic< T > &atomic, Func updater) |
Atomically performs the operation of updater on atomic | |
template<typename T > | |
T | utils::AtomicMin (std::atomic< T > &atomic, T value) |
Concurrently safe sets atomic to a value if value is less. | |
template<typename T > | |
T | utils::AtomicMax (std::atomic< T > &atomic, T value) |
Concurrently safe sets atomic to a value if value is greater. | |