4 ms·
One could do the synchronization thing with zig's async await, it would just cause the code to become a compile error in blocking I/O mode. The code author woul
by AndyKelley 6y ago
One could do the synchronization thing with zig's async await, it would just cause the code to become a compile error in blocking I/O mode. The code author would then have the option to document that function / library / application as not supporting blocking I/O mode, or explicitly put an `if (std.io.io_mode == .blocking)` check there and provide a blocking implementation.