[Python-ideas] Extend socket.accept to put accepted socket in non-blocking mode

Chris Angelico rosuav at gmail.com
Fri Mar 7 12:08:23 CET 2014


On Fri, Mar 7, 2014 at 8:37 PM, Saúl Ibarra Corretgé <saghul at gmail.com> wrote:
> The idea is to accept an incoming connection and make it non-blocking at the
> same time, asyncio and other frameworks would benefit from this by doing one
> function call and 2 syscalls less (on supported systems, that is).

Is the benefit that it's simply more efficient, or is there a specific
benefit from atomicity? The latter is a pretty strong argument (look
at close-on-exec for instance), if it applies.

ChrisA


More information about the Python-ideas mailing list