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.
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.