Go: concurrency patterns
This article is the result of me taking notes and trying out basic concurrency concepts presented by Rob Pike in his talk available here: YT video by Rob Pike.
Spawning a goroutine
When you just want to run a goroutine, it does not make the caller wait. The program behaves as if you just spawn a shell command with & at the end.
|
|
We could wait some time for the goroutine to finish:



 page /en/posts/2024-10-06_about_rust/code_rust_lox.png](/en/posts/2024-10-06_about_rust/code_rust_lox.png)





