ATLAS Offline Software
Classes | Namespaces
AtomicDecorator.h File Reference

Access an auxiliary variable atomically. More...

#include "AthContainers/AuxElement.h"
#include "AthContainers/tools/AuxDataTraits.h"
#include <atomic>
#include <type_traits>
#include "AthContainers/tools/AtomicDecorator.icc"
Include dependency graph for AtomicDecorator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SG::AtomicDecorator< T, ALLOC >
 Access an auxiliary variable atomically. More...
 

Namespaces

 SG
 Forward declaration.
 

Detailed Description

Access an auxiliary variable atomically.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Mar, 2018 This is like SG::Decorator, except that accesses to the underlying T variable are cast to std::atomic<T>. This will generally work only for fundamental integer types or for pointers.

This is the way to access variables that were declared with Flags::Atomic . Be aware, however, that it is still possible to have non-atomic accesses to such variables via either the implicit operations provided by AuxTypeRegistry or by explicit access to the value vector. Therefore, this is not recommended for general use. Contact core software before using this for new code.

Definition in file AtomicDecorator.h.