|
|
|
|
|
by ceronman
2225 days ago
|
|
I'm not that experienced with Go, but it seems to me that the equivalent Go code to var foo = await bar();
is foo := bar()
Go concurrency is much nicer because it doesn't have colored functions. You can use the same functions and library both synchronously and concurrently in millions of goroutines. |
|
It is true that, due to the runtime implementation,
Is significantly less wasteful than So there is less of a need for async code in Go.But if you want to start multie things in parallel and await all of them, or if you want to create asynchronous workflows that modify shared resources without locking, you don't have any Go library or construct to help, which was precisely what async/await gives you.