3 ms·
Usually the coloring problem IME goes the other way: you want to run a synchronous/blocking function in an async context. How does Zig deal with that?
by xxpor 3y ago
Usually the coloring problem IME goes the other way: you want to run a synchronous/blocking function in an async context. How does Zig deal with that?
- lvass 3y agoFunction calls?
- Nullabillity 3y agoAnd now you're blocking the event loop.
- lvass 3y agoIf you chose to use cooperative concurrency, it's because you can make it cooperate. Use preemption otherwise.
- j16sdiz 3y agoThey have await keyword. This is noop in sync mode
- kprotty 3y agoDid you mean the `nosuspend` keyword? It only asserts nothing suspends rather than there being a "sync" mode.