![]() |
ATLAS Offline Software
|
Implementation of Updater for RCUSvc. More...
#include <RCUUpdater.h>
Public Types | |
| typedef EventContext | Context_t |
| Execution context type. More... | |
Public Member Functions | |
| template<typename... Args> | |
| RCUUpdater (IRCUSvc &rcusvc, Args &&... args) | |
| Constructor. More... | |
| void | update (std::unique_ptr< T > p, const Context_t &ctx) |
| Install a new object. More... | |
| const T & | get () const |
| Return a reference to the current object. More... | |
| void | quiescent (const Context_t &ctx) |
| Mark that an event slot is not referencing this object. More... | |
| void | discard (std::unique_ptr< T > p) |
| Queue an object for later deletion. More... | |
Static Public Member Functions | |
| static const Context_t & | defaultContext () |
| Return the current event context. More... | |
Private Attributes | |
| RCUObject< T > | m_obj |
| The managed object. More... | |
Implementation of Updater for RCUSvc.
This is an implementation of the Updater interface defined in CxxUtils/ConcurrentRangeMap.h using RCUSvc.
This uses RCUObject to manage an instance of type T.
Definition at line 38 of file RCUUpdater.h.
| typedef EventContext Athena::RCUUpdater< T >::Context_t |
Execution context type.
Definition at line 42 of file RCUUpdater.h.
| Athena::RCUUpdater< T >::RCUUpdater | ( | IRCUSvc & | rcusvc, |
| Args &&... | args | ||
| ) |
Constructor.
| rcusvc | RCU service instance. |
| args | Additional arguments to pass to the T constructor. |
Creates a new instance of T.
|
static |
Return the current event context.
| void Athena::RCUUpdater< T >::discard | ( | std::unique_ptr< T > | p | ) |
Queue an object for later deletion.
| p | The object to delete. |
The object p will be queued for deletion once a grace period has passed for all slots. In contrast to using update, this does not change the current object. It also does not mark the current slot as having completed the grace period (so this can be called by a thread running outside of a slot context).
| const T& Athena::RCUUpdater< T >::get | ( | ) | const |
Return a reference to the current object.
| void Athena::RCUUpdater< T >::quiescent | ( | const Context_t & | ctx | ) |
Mark that an event slot is not referencing this object.
| void Athena::RCUUpdater< T >::update | ( | std::unique_ptr< T > | p, |
| const Context_t & | ctx | ||
| ) |
Install a new object.
| p | The new object to install. |
| ctx | Current execution context. |
The existing object should not be deleted until it can no longer be referenced by any thread.
|
private |
The managed object.
Definition at line 100 of file RCUUpdater.h.
1.8.18