[web2py] Re: A basic problem about threading and time consuming function...

2010-05-26 Thread Allard
cause of thread context switching. See also: http://www.kegel.com/c10k.html For most web apps a thread per connection (from a threadpool) won't be a problem but for for things like Ajax email applications or chat / IM it does get troublesome. On May 25, 10:59 pm, mdipierro wrote: > On

[web2py] Re: A basic problem about threading and time consuming function...

2010-05-25 Thread Allard
Comet is a nice way to get this done but I wonder how to implement comet efficiently in web2py. Massimo, does web2py use a threadpool under the hood? For comet you would then quickly run out of threads. If you'd try to do this with a thread per connection things would get out of hand pretty quickly

[web2py] Re: A basic problem about threading and time consuming function...

2010-05-25 Thread Allard
It seems like Comet would be hard to implement in web2py. Does web2py use a threadpool internally? If so, I can see you run out of threads pretty quickly. Ideally you would like to solve these kind of problems with an asynchronous model (think Gevent, Eventlet, Concurrence, Toranado). I am working