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

Class SWIG_Python_Thread_Allow

src/MeCab/MeCab_wrap.cpp:988–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

986 ~SWIG_Python_Thread_Block() { end(); }
987 };
988 class SWIG_Python_Thread_Allow {
989 bool status;
990 PyThreadState *save;
991 public:
992 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
993 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
994 ~SWIG_Python_Thread_Allow() { end(); }
995 };
996# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
997# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
998# 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