Commit 6db2aaa1 authored by Tom Niget's avatar Tom Niget

Disable subinterpreter use

parent 578ab3c4
...@@ -395,19 +395,19 @@ namespace detail { ...@@ -395,19 +395,19 @@ namespace detail {
} }
#ifdef TYPON_EXTENSION #ifdef TYPON_EXTENSION
class SubInterpreter { class InterpGuard {
PyThreadState* main; PyThreadState* main;
PyThreadState* sub; PyThreadState* sub;
public: public:
SubInterpreter() { InterpGuard() {
main = PyThreadState_Get(); /*main = PyThreadState_Get();
sub = Py_NewInterpreter(); sub = Py_NewInterpreter();*/
} }
~SubInterpreter() { ~InterpGuard() {
Py_EndInterpreter(sub); /*Py_EndInterpreter(sub);
PyThreadState_Swap(main); PyThreadState_Swap(main);*/
} }
}; };
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment