debug
This commit is contained in:
parent
4d439101ca
commit
0673469b29
|
@ -1,14 +1,18 @@
|
|||
#include <Python.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
struct PyLockGIL
|
||||
{
|
||||
|
||||
PyLockGIL(): gstate(PyGILState_Ensure())
|
||||
{
|
||||
std::cout << "construct GIL" << std::endl;
|
||||
}
|
||||
|
||||
~PyLockGIL()
|
||||
{
|
||||
PyGILState_Release(gstate);
|
||||
std::cout << "destruct GIL" << std::endl;
|
||||
}
|
||||
|
||||
PyLockGIL(const PyLockGIL&) = delete;
|
||||
|
|
Loading…
Reference in New Issue