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

Class SWIG_Python_Thread_Block

swig/python/export_wrap.cpp:1054–1061  ·  view source on GitHub ↗

C++ code */

Source from the content-addressed store, hash-verified

1052# endif
1053# ifdef __cplusplus /* C++ code */
1054 class SWIG_Python_Thread_Block {
1055 bool status;
1056 PyGILState_STATE state;
1057 public:
1058 void end() { if (status) { PyGILState_Release(state); status = false;} }
1059 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1060 ~SWIG_Python_Thread_Block() { end(); }
1061 };
1062 class SWIG_Python_Thread_Allow {
1063 bool status;
1064 PyThreadState *save;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected