[Stackless] Stackless and mysqldb Re: Stackless Digest, Vol 48, Issue 8

Andrew Francis andrewfr_ice at yahoo.com
Tue Jan 15 15:33:58 CET 2008


Hi Simon:

> You may need to take care - Stackless doesn't know
> about the new  thread so if no tasklets are running
>(while blocked waiting for a result from the thread)
>then it will think there's a deadlock and  
> exit from its main loop.

If you look at ThreadedWebserver.py in the Google
repository, you will see an example of how to use
Stackless Python with a thread. I use a tasklet,
tick() to prevent deadlock. You can ignore the Twisted
part.

If I have time, perhaps I can look at MySQL's
interface and figure out a way of calling it through a
network connection, hence avoiding the blocking.

Cheers,
Andrew



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 





More information about the Stackless mailing list