MCPcopy Create free account
hub / github.com/SamuraiT/mecab-python3 / SWIG_Python_Thread_Block

Class SWIG_Python_Thread_Block

src/MeCab/MeCab_wrap.cpp:980–987  ·  view source on GitHub ↗

C++ code */

Source from the content-addressed store, hash-verified

978# endif
979# ifdef __cplusplus /* C++ code */
980 class SWIG_Python_Thread_Block {
981 bool status;
982 PyGILState_STATE state;
983 public:
984 void end() { if (status) { PyGILState_Release(state); status = false;} }
985 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
986 ~SWIG_Python_Thread_Block() { end(); }
987 };
988 class SWIG_Python_Thread_Allow {
989 bool status;
990 PyThreadState *save;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected