rogue
Loading...
Searching...
No Matches
ScopedGil.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_SCOPED_GIL_H__
18#define __ROGUE_SCOPED_GIL_H__
19
20#include "rogue/Directives.h"
21#ifndef NO_PYTHON
22 #include <boost/python.hpp>
23#endif
24
25namespace rogue {
26
35class ScopedGil {
36#ifndef NO_PYTHON
37 PyGILState_STATE state_;
38#endif
39
40 public:
42 ScopedGil();
44 ~ScopedGil();
45};
46} // namespace rogue
47
48#endif
RAII helper that acquires the Python GIL for a scope.
Definition ScopedGil.h:35
~ScopedGil()
Releases the GIL acquired by this scope.
Definition ScopedGil.cpp:25
ScopedGil()
Acquires the GIL for this scope.
Definition ScopedGil.cpp:19