[Stackless] irc threads

Jeff Senn senn at maya.com
Wed Jul 8 20:48:15 CEST 2009

On Jul 8, 2009, at 2:31 PM, Adam Bark wrote:

> 2009/7/8 Rach <rachie at oasiz.net>
> Hello,
> I am new to Python, but playing with an irc server (made with python  
> of course) and am finding a problem with accepting more than 1000  
> users/connections.
> I've googled for a while and ended up here as it appears to be  
> something to do with the "thread stack limit". Does anyone know if  
> that is correct and if stackless python will help?
> If your using a seperate thread per user/connection then I would  
> suspect that you are right. Stackless should be able to help as you  
> can have tens of thousands of tasklets on a normal PC.

Err... maybe (see below).

You might also want to check out Twisted: http://twistedmatrix.com/trac/

> If so, do you think the edits will be huge?
> The only real threading bit is this: threading.Thread.__init__(self)
> Thanks so much for any help you can give me.
> Erm.. without seeing your code it's hard to say for sure but you  
> should just be able to switch the thread making bit with making a  
> tasklet from the same bit of code.

I'd bet it's not nearly so simple.  Probably you are using threads  
because they do blocking socket IO.
Stackless is not going to (directly) help with that -- and if you  
don't know what I'm talking about, then even
the explanation is fairly lengthy... taking a look here might help:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20090708/3cd1b183/attachment.htm>

More information about the Stackless mailing list