Re: [python-win32] Embedded Python and multithreading

2008-06-26 Thread Mark Hammond
> PyThreadState* tcur = PyThreadState_Get() ; > > PyThreadState_Swap(NULL); > PyThreadState_Clear(tcur); > PyThreadState_Delete(tcur); > > // release the GIL as PyEval_InitThreads > // implicitly acquires the GIL > PyEval_ReleaseLock(); > > PyGILSt

[python-win32] Embedded Python and multithreading

2008-06-25 Thread thorsten riesberg
Hi all, can anybody explain me why the following code is not running: // #include "stdafx.h" #include #include #include #include "Python.h" DWORD WINAPI Callback1( LPVOID lpvData){ PyObject *pName, *pModule, *pDict, *pFunc, *pValue; PyThreadState* tcur = PyThreadS