Twisted/Woven threading?

Ivan Voras ivoras at __geri.cc.fer.hr
Tue Mar 2 14:42:17 EST 2004


Bob Ippolito wrote:
> On 2004-02-29 20:07:04 -0500, Ivan Voras <ivoras at __geri.cc.fer.hr> said:
> 
>> I've experimented with a simple web application made with woven and 
>> stated by twistd from a .tap file, on a Win32. It seems that the web 
>> server started that way is not multitasked/multithreaded and that one 
>> request that requires long processing (e.g. a factory that produces a 
>> long result fetched from a database) makes the server totaly 
>> unresponsive.
>>
>> Is that normal? What can I do to make it multithreaded?
> 
> 
> You're probably using DBAPI stuff directly, you can't do that, it's 
> blocking.  You need to do that work in a separate thread, the easiest 
> way is probably with twisted.enterprise.  There are tutorials and such 
> about this, and a better place to ask is the Twisted mailing list(s).

Actually, I don't think the problem is in the db itself, but in the 
formatting (the "factory" that transformed database result into xhtml). 
The query itself is fast and trivial.



More information about the Python-list mailing list