ATLAS Offline Software
Loading...
Searching...
No Matches
Control
RootUtils
RootUtils
PyAthenaGILStateEnsure.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// PyAthenaGILStateEnsure.h
8
// Header file for convenience class to ensure GIL
9
// Author: Wim Lavrijsen <WLavrijsen@lbl.gov>
11
#ifndef ROOTUTILS_PYGILSTATEENSURE_H
12
#define ROOTUTILS_PYGILSTATEENSURE_H
13
14
// Python includes
15
#include "Python.h"
16
17
namespace
RootUtils
{
18
19
class
PyGILStateEnsure
20
{
21
public
:
22
PyGILStateEnsure
();
23
PyGILStateEnsure
(
const
PyGILStateEnsure
& ) =
delete
;
24
PyGILStateEnsure
&
operator=
(
const
PyGILStateEnsure
& ) =
delete
;
25
~PyGILStateEnsure
();
26
27
private
:
28
PyGILState_STATE
m_gstate
;
29
};
30
34
35
inline
PyGILStateEnsure::PyGILStateEnsure
()
36
:
m_gstate
(PyGILState_Ensure())
37
{
38
}
39
40
inline
PyGILStateEnsure::~PyGILStateEnsure
()
41
{
42
PyGILState_Release(
m_gstate
);
43
}
44
45
}
//> namespace RootUtils
46
47
#endif
//> ROOTUTILS_PYATHENA_PYGILSTATEENSURE_H
RootUtils::PyGILStateEnsure::PyGILStateEnsure
PyGILStateEnsure(const PyGILStateEnsure &)=delete
RootUtils::PyGILStateEnsure::m_gstate
PyGILState_STATE m_gstate
Definition
PyAthenaGILStateEnsure.h:28
RootUtils::PyGILStateEnsure::~PyGILStateEnsure
~PyGILStateEnsure()
Definition
PyAthenaGILStateEnsure.h:40
RootUtils::PyGILStateEnsure::PyGILStateEnsure
PyGILStateEnsure()
Inline methods:
Definition
PyAthenaGILStateEnsure.h:35
RootUtils::PyGILStateEnsure::operator=
PyGILStateEnsure & operator=(const PyGILStateEnsure &)=delete
RootUtils
Definition
ILogger.h:20
Generated on
for ATLAS Offline Software by
1.14.0