Mantid
Loading...
Searching...
No Matches
GlobalInterpreterLock.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
11
12namespace Mantid {
13namespace PythonInterface {
14
16 PyGILState_STATE m_state;
17};
18
24public:
28 static bool locked();
30 static PyGILState_STATE acquire();
32 static void release(PyGILState_STATE tstate);
34
39
40private:
43 PyGILState_STATE m_state;
44};
45
46} // namespace PythonInterface
47} // namespace Mantid
Defines a structure for acquiring/releasing the Python GIL using the RAII pattern.
GlobalInterpreterLock(const GlobalInterpreterLock &)
PyGILState_STATE m_state
Current GIL state.
#define MANTID_PYTHONINTERFACE_CORE_DLL
Definition: DllConfig.h:17
Helper class which provides the Collimation Length for SANS instruments.