#Does Zig provide any mechanism to write concurrent code? Something like Go routines or async/await?
1 messages · Page 1 of 1 (latest)
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.
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?
there are also a few coroutine libraries like zigcoro and libvex and stuff
you can see #1024381264213594242
zig-aio is another popular one
Thanks