[Python-Dev] Socket timeout and completion based sockets
Kristján Valur Jónsson
kristjan at ccpgames.com
Tue Nov 27 10:23:02 CET 2012
Yes, well, as a matter of fact, I do have an IOCP based socket implementation with stackless python.
>From the programmer's perspective, operations appear blocking while IOCP is used to switch tasklets in the background.
But my socket timeout implementation does not guarantee that the socket is left in a valid state for retrying a recv() operation.
I was under the (perhaps mistaken) impression that the current async work _could_ result in a standardized way to create such
alternative socket implementations, ones that might do their magic using greenlets, tasklets, or generators. But if that were
the case, such loosely defined features of the socket API would need clearer definitions.
> -----Original Message-----
> From: gvanrossum at gmail.com [mailto:gvanrossum at gmail.com] On Behalf
> Of Guido van Rossum
> Sent: 26. nóvember 2012 15:59
> To: Kristján Valur Jónsson
> Cc: Python-Dev (python-dev at python.org)
> Subject: Re: [Python-Dev] Socket timeout and completion based sockets
> If you're talking about the standard socket module, I'm not aware that it uses
> IOCP on Windows. Are you asking this just in the abstract, or do you know of
> a Python implementation that uses IOCP to implement the standard socket
> As to the design of the async I/O library (which I am still working on!), I
> cannot guarantee anything, and the issue will probably be moot
> -- the API won't have the same kind of timeout as the current socket object
> (it will have other ways to set deadlines though).
More information about the Python-Dev