Message306385
> Perhaps you can just dup() the socket? That's what the ref counter is for IIRC.
I already dup them for loop.create_server(sock=sock) and loop.create_connection(sock=sock) cases. Duping for sock_recv & friends will add too much overhead (they are relatively short operations). Another argument against duping is that the number of open FDs is a limited OS resource.
So far Victor's idea of using '_io_refs' sounds like a perfect fit for both asyncio and uvloop. After all, asyncio use case is very similar to `socket.makefile()` -- keep the socket object alive while another API relies on it. |
|
Date |
User |
Action |
Args |
2017-11-16 17:09:27 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, pitrou, vstinner, asvetlov, Ben.Darnell |
2017-11-16 17:09:27 | yselivanov | set | messageid: <1510852167.37.0.213398074469.issue32038@psf.upfronthosting.co.za> |
2017-11-16 17:09:27 | yselivanov | link | issue32038 messages |
2017-11-16 17:09:27 | yselivanov | create | |
|