On Wed, Dec 18, 2013 at 9:26 PM, Daniel Pocock <dan...@pocock.com.au> wrote: > b) when each worker thread starts, call > PyThreadState_New(mInterpreterState) and save the result in a thread > local mPyThreadState > > c) use the mPyThreadState with PyEval_RestoreThread and > PyEval_SaveThread before and after calling Python methods > > Is this a bug in PyGILState_Ensure or is it a deficiency in the > documentation?
It doesn't surprise me that you would need to do step b - I do seem to recall the need to call that for each new thread. Not so sure about c. Once you fixed the unrelated bug, do you still need that step? (Been a while since I last embedded Python though, and I might well be wrong.) ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com