MCPcopy Create free account
hub / github.com/chokkan/crfsuite / SWIG_Python_Thread_Allow

Class SWIG_Python_Thread_Allow

swig/python/export_wrap.cpp:1062–1069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060 ~SWIG_Python_Thread_Block() { end(); }
1061 };
1062 class SWIG_Python_Thread_Allow {
1063 bool status;
1064 PyThreadState *save;
1065 public:
1066 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1067 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1068 ~SWIG_Python_Thread_Allow() { end(); }
1069 };
1070# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1071# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1072# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected