Le Wed, 28 Nov 2012 12:13:15 +0000,
Kristján Valur Jónsson <krist...@ccpgames.com> a écrit :
> I'm sorry, I thought it was something that people did more often, to
> create different implementations of of the "socket" api, for which
> cPython provided a mere reference implementation.  I know of at least
> three different alternative implementations, so I thought that the
> question were clear enough:  Is the timeout mechanism "supposed" to
> be re-startable for an api that aims to conform to the "socket"
> module, or is that a mere coincidence falling out from the select/bsd
> based reference implementation in cPython?

I think recv() and send() (and other simple ops) should certainly be
restartable. sendall() is another matter, I think it should be
considered a best effort thing.

> Anyway, as for concrete requirements:  The issue I have always seen
> with various asynchronous libraries is their lack of composability.

Note: if you are using an asynchronous library, you probably shouldn't
be using any form of socket timeout. Instead, you should be using
timer callbacks as provided by the asynchronous library.
(and the sockets themselves, of course, should be put in non-blocking
mode)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to