4 ms·
But AFAICT in Zig you don't have to have async and sync versions. Instead, the runtime may choose to interpret `try` as an async or as a synchronous call, the l
by nine_k 1y ago
But AFAICT in Zig you don't have to have async and sync versions. Instead, the runtime may choose to interpret `try` as an async or as a synchronous call, the latter is equivalent to a future / promise that resolves before the next statement [1]. This is a sane approach.
Having separate sync / async versions that look like the same function is a great way to introduce subtle bugs.
[1]: https://kristoff.it/blog/zig-new-async-io/ https://kristoff.it/blog/zig-new-async-io/