ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaKernel
AthenaKernel
RCUUpdater.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
4
*/
5
// $Id$
12
13
14
#ifndef ATHENAKERNEL_RCUUPDATER_H
15
#define ATHENAKERNEL_RCUUPDATER_H
16
17
18
#include "
AthenaKernel/RCUObject.h
"
19
#include "
AthenaKernel/IRCUSvc.h
"
20
#include "GaudiKernel/EventContext.h"
21
#include "GaudiKernel/ThreadLocalContext.h"
22
#include <utility>
23
#include <memory>
24
25
26
namespace
Athena
{
27
28
37
template
<
class
T>
38
class
RCUUpdater
39
{
40
public
:
42
typedef
EventContext
Context_t
;
43
44
52
template
<
typename
...
Args
>
53
RCUUpdater
(
IRCUSvc
& rcusvc,
Args
&&... args);
54
55
64
void
update
(std::unique_ptr<T> p,
const
Context_t
& ctx);
65
66
70
const
T&
get
()
const
;
71
72
76
void
quiescent
(
const
Context_t
& ctx);
77
78
89
void
discard
(std::unique_ptr<T> p);
90
91
95
static
const
Context_t
&
defaultContext
();
96
97
98
private
:
100
RCUObject<T>
m_obj
;
101
};
102
103
104
}
// namespace Athena
105
106
107
#include "
AthenaKernel/RCUUpdater.icc
"
108
109
110
#endif
// not ATHENAKERNEL_RCUUPDATER_H
IRCUSvc.h
read-copy-update (RCU) style synchronization for Athena.
RCUObject.h
read-copy-update (RCU) style synchronization for Athena.
RCUUpdater.icc
Athena::IRCUSvc
Interface for RCU service.
Definition
IRCUSvc.h:40
Athena::RCUObject
Wrapper object controlled by RCU synchonization.
Definition
RCUObject.h:312
Athena::RCUUpdater::m_obj
RCUObject< T > m_obj
The managed object.
Definition
RCUUpdater.h:100
Athena::RCUUpdater::update
void update(std::unique_ptr< T > p, const Context_t &ctx)
Install a new object.
Athena::RCUUpdater::defaultContext
static const Context_t & defaultContext()
Return the current event context.
Athena::RCUUpdater::get
const T & get() const
Return a reference to the current object.
Athena::RCUUpdater::Context_t
EventContext Context_t
Execution context type.
Definition
RCUUpdater.h:42
Athena::RCUUpdater::RCUUpdater
RCUUpdater(IRCUSvc &rcusvc, Args &&... args)
Constructor.
Athena::RCUUpdater::quiescent
void quiescent(const Context_t &ctx)
Mark that an event slot is not referencing this object.
Athena::RCUUpdater::discard
void discard(std::unique_ptr< T > p)
Queue an object for later deletion.
Athena
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....
Definition
AthDsoUtils.h:10
Args
Definition
test_lwtnn_fastgraph.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0