<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 8, 2009, at 2:31 PM, Adam Bark wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">2009/7/8 Rach <span dir="ltr">&lt;<a href="mailto:rachie@oasiz.net">rachie@oasiz.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; "> <div>Hello,</div><div><br></div><div>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.</div><div><br></div><div>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?</div> </blockquote><div><br>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.<br></div></div></blockquote><div><br></div>Err... maybe (see below).</div><div><br></div><div>You might also want to check out Twisted:&nbsp;<a href="http://twistedmatrix.com/trac/">http://twistedmatrix.com/trac/</a></div><div><br><blockquote type="cite"><div class="gmail_quote"><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div></div> <div><br></div><div>If so, do you think the edits will be huge?</div><div><br></div><div>The only real threading bit is this:&nbsp;threading.Thread.__init__(self)</div><div><br></div><div>Thanks so much for any help you can give me.</div> </blockquote><div><br>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.<br></div></div></blockquote><div><br></div>I'd bet it's not nearly so simple. &nbsp;Probably you are using threads because they do blocking socket IO.</div><div>Stackless is not going to (directly) help with that -- and if you don't know what I'm talking about, then even</div><div>the explanation is fairly lengthy... taking a look here might help:</div><div><br></div><div><a href="http://code.google.com/p/stacklessexamples/wiki/StacklessNonblockModules">http://code.google.com/p/stacklessexamples/wiki/StacklessNonblockModules</a></div><div><br></div></body></html>