Skip to content

Comment on Zig’s Io.Threaded is neat

Comments

All my days of low level stuff were in the windows world where async/cancel was supported since nt kernel days at least. Wrapping this coherently at some level of abstraction was always worth doing, although threads are just one way. Overlapped I/O let you do it all on one thread. Linux looks harder.

Great that Zig is supporting this more “first class”; not strictly required, but looks useful.

If you are comparing to overlapped I/O, you should use io_uring as reference and cancellation in io_uring is fairly simple.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.