Plugins: Fix python threading

Release global interpreter lock during api calls
This commit is contained in:
James Booth
2016-03-09 23:36:22 +00:00
parent 85abab6bf9
commit d157e9bf71
2 changed files with 62 additions and 4 deletions

View File

@@ -42,18 +42,18 @@
#include "plugins/python_plugins.h"
#include "ui/ui.h"
//static PyThreadState *thread_state;
static PyThreadState *thread_state;
void
allow_python_threads()
{
// thread_state = PyEval_SaveThread();
thread_state = PyEval_SaveThread();
}
void
disable_python_threads()
{
// PyEval_RestoreThread(thread_state);
PyEval_RestoreThread(thread_state);
}
void