On 03/07/2014 11:40 AM, Antoine Pitrou wrote:Probably not, I'll have a look.
On Fri, 07 Mar 2014 10:37:58 +0100
Saúl Ibarra Corretgé <saghul-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
accept4 allows us to do this with a single syscall, and it made it into
FreeBSD 10, so that's another system that could benefit from this
optimization.
If it doesn't, then perhaps the configure script needs to be fixed.
Actually, after http://hg.python.org/cpython/rev/5f0d1aad7322/ it's 2 function calls (accept + set_blocking)+ 2 syscalls (accept + ioctl FIONBIO) vs 1 function call (accept) + 1 syscall (accept4).
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).
That's not likely to do a significant difference (benchmarks welcome).
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/