Mercurial > hg > vampy
diff PyPlugin.h @ 3:134313c59d82
* Add global mutex to PyPlugin -- all plugin method calls are strictly
serialised in order to avoid problems with Python interpreter's lack of
thread safety.
author | cannam |
---|---|
date | Fri, 14 Mar 2008 12:02:15 +0000 |
parents | e20e214bdfb5 |
children | e1b508f2f914 |
line wrap: on
line diff
--- a/PyPlugin.h Wed Mar 12 12:42:19 2008 +0000 +++ b/PyPlugin.h Fri Mar 14 12:02:15 2008 +0000 @@ -40,7 +40,9 @@ #define _PYTHON_WRAPPER_PLUGIN_H_ #include "vamp-sdk/Plugin.h" -#include "/usr/include/python/Python.h" +#include <Python.h> + +#include "Mutex.h" //fields in OutputDescriptor enum eOutDescriptors { @@ -130,6 +132,8 @@ std::string m_plugin; std::string m_class; std::string m_path; + + static Mutex m_pythonInterpreterMutex; };