[Python-Dev] SocketServer issues (original) (raw)

PJ Eby pje at telecommunity.com
Wed Mar 14 17:17:06 CET 2012


On Wed, Mar 14, 2012 at 5:02 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:

On Wed, 14 Mar 2012 04:26:16 +0000 Kristján Valur Jónsson <kristjan at ccpgames.com> wrote: > Hi there. > I want to mention some issues I've had with the socketserver module, and discuss if there's a way to make it nicer. > So, for a long time we were able to create magic stackless mixin classes for > it, like ThreadingMixIn, and assuming we had the appropriate socket > replacement library, be able to use it nicely using tasklets.

I don't really think the ability to "create magic stackless mixin classes" should be a driving principle for the stdlib.

But not needlessly duplicating functionality already elsewhere in the stdlib probably ought to be. ;-)

So, my first question is: Why not simply rely on the already built-in timeout > support in the socket module?

In case you didn't notice, the built-in timeout support also uses select().

That's not really the point; the frameworks that implement nonblocking I/O by replacing the socket module (and Stackless is only one of many) won't be using that code. If SocketServer uses only the socket module's API, then those frameworks will be told about the timeout via the socket API, and can then implement it their own way. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120314/c444a90e/attachment.html>



More information about the Python-Dev mailing list