[Stackless] Putting apps to sleep and waking them up from the API

Chris chris at northarc.com
Fri Jun 11 13:03:08 CEST 2010

On 6/10/2010 5:15 PM, Kristján Valur Jónsson wrote:
> This is what your worker thread code must look like:
> thread(){
> 	PyGILState_STATE mState;
> 	mState = PyGILState_Ensure();
> 	/* now you have created a new thread state if not already done, and are ship-shape */

Yahtzee! That was the missing piece. Thanks for the crash-course on 
thread safety in a python-aware app, somehow in my research I missed 
that. Works flawlessly thanks.

More information about the Stackless mailing list