Giampaolo Rodola' added the comment:

I think asyncio would be better off using os.sendfile() / TransmitFile 
directly, in fact the current patch explicitly does not support non-blocking 
sockets (I couldn't see any sane approach to do that).
Here's an example of how os.sendfile() should be used in an async manner:
https://code.google.com/p/pyftpdlib/source/browse/tags/release-0.7.0/pyftpdlib/ftpserver.py#1035
asyncio should be doing something very similar to that and do the necessary 
stuff so that you can "yield from transport.sendfile(file)".
Actually I can see what I can do in that regard after I'm finished with this.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17552>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to