Await expressions (Posting On Python-List Prohibited)
Mild Shock
janburse at fastmail.fm
Sat Feb 3 04:15:44 EST 2024
Funny source code tells me IOCP is used;
proactor is only implemented on Windows with IOCP.
https://github.com/python/cpython/blob/3.12/Lib/asyncio/proactor_events.py
But maybe the focus is more on networking than file system.
But it has sock_sendfile() that might avoid copying data to userspace.
Mild Shock schrieb:
> The docu tells me:
>
> Windows
> loop.add_reader() and loop.add_writer() only accept
> socket handles (e.g. pipe file descriptors are not supported).
> https://docs.python.org/3/library/asyncio-platforms.html
>
> Alternatives are aiofiles and anyio and maybe more,
> but not sure whether they span all platforms, i.e. unix,
> windows and mac or whether they have similar restrictions.
>
> Theoretically on Windows IOCP should also cover file handles:
> https://en.wikipedia.org/wiki/Input/output_completion_port
>
> Its use by libuv the basis for node.js.
>
> Lawrence D'Oliveiro schrieb:
>> On Sat, 3 Feb 2024 00:45:18 +0100, Mild Shock wrote:
>>
>>> ... that works on windows ...
>>
>> You lost me there.
>>
>
More information about the Python-list
mailing list