#Does Zig provide any mechanism to write concurrent code? Something like Go routines or async/await?

1 messages · Page 1 of 1 (latest)

neat furnace
#

I'm looking for blog posts or documentation about how to write concurrent code in Zig. I'm new to Zig and I'm just finding some posts that seems a bit out of date.

midnight scaffold
#

Currently, no.

#

It kinda makes sense not to have such a thing in a systems language, because you generally have very specific requirements and concerns with async stuff, and as such, you want control over it.
Also, if there was an official async feature, then literally everyone would just blindly use it - even if it didn't really fit their usecase.

#

Which just makes code quality shittier for everybody

#

Or at least, that's a concern to take into account when having it built-in.

neat furnace
#

Yeah, its make sense. So if I want to build a concurrent code the approach would be to build something on top of std.Thread?

gentle hornet
#

zig-aio is another popular one

neat furnace
#

Thanks