Skip to content

Comment on Zig: Upcoming release postponed two more weeks and lacks async functionsparent

Comments

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?

Function calls?

And now you're blocking the event loop.

If you chose to use cooperative concurrency, it's because you can make it cooperate. Use preemption otherwise.

They have await keyword. This is noop in sync mode

Did you mean the `nosuspend` keyword? It only asserts nothing suspends rather than there being a "sync" mode.

AboutSource Built by g1lg1l

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