wepoll-d — a single-file D port of wepoll (epoll-style socket polling for Windows)

Timur Moldazhan tim.moldazhan at gmail.com
Tue Nov 24 10:03:42 UTC 2026


On Tuesday, 24 November 2026 at 09:42:36 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> Just a heads up to anyone who may think that this is a good 
> approach, it requires calling undocumented and specifically 
> made hard to access syscalls.
>
> https://notgull.net/device-afd/


Fair point — thanks for flagging it. That's inherent to wepoll's 
design rather than something the D port introduces: it opens 
\Device\Afd with NtCreateFile, issues IOCTL_AFD_POLL, and 
resolves ntdll.dll functions at runtime. My port keeps exactly 
that mechanism, so it inherits all the same caveats.

I should have called it out more clearly, so I've added a 
Limitations section to the README with your link and Microsoft's 
warning about internal APIs.

For context, as the article itself notes, this isn't an obscure 
experiment — libuv (Node.js), mio/Tokio, polling/smol/async-std 
and ZeroMQ all rely on the same AFD trick, so it's widely 
deployed. That said, the trade-offs are real: no stability 
guarantee from Microsoft, no Wine support, and likely problems in 
UWP apps.



More information about the Digitalmars-d-announce mailing list