Event driven server that wastes CPU when threaded doesn't

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Sun Oct 29 12:42:22 CET 2006

Snor wrote:

> There is a lot of interaction between the clients and they would
> often need to write to the same list of values, which of course
> becomes a problem with a threaded server - so event driven solves
> that problem, and I assumed it would solve all my problems.

Which problem, and why "of course"? Sorry, I can't follow you
here :)

> I will want the server to support as many users as is possible on
> any given machine - and so wasted CPU cycles is something I am
> trying to avoid.

I'm not exactly sure how you connect to that SQL server ... you
shouldn't wait for the response of the MySQL server in a blocking
way, but either using dataReceived() method of the protocol
instance or, if that isn't possible, by using a Deferred instance
that fires when the answer is available. This is also possible with
your client connections.


BOFH excuse #354:

Chewing gum on /dev/sd3c

More information about the Python-list mailing list