Hey guys! The repo with the source code for this video is here: github.com/sigrdrifa/go-concurrency And my NVIM config is here: github.com/sigrdrifa/nvim
Great content, just wanted to point out not entirely correct information about difference in buffered and unbuffered channels. They are not about unlimited and limited data, but about blocking/unblocking operations. Unbuffered channel sends one piece of data and current goroutine stops execution until another goroutine will read the data from the channel. On the other hand, buffered channel allows execution until channel becomes full (the capacity parameter in make() function). When buffered channel is full it behaves like unbuffered channel until some goroutine will read some data from it. Hope it was interesting for you. I’ve watched all your videos, good job!
Thank you very much for making my requested video 🙏🏽. This is a good and clear real life use case. I would also like to ask for another video about what are the differences using json.Marshal or json.Unmarshal and json. Encoder or json.Decoder in go. I know they both are used to convert go types to json and vice versa. But I don't know why and where to use one over the other. A video with some vivid/concrete examples of why and where to use each or reply to this comment could help me understand. Thank you in advance 🙏🏽.
what are your thoughts on following a pattern like main uses a handler which uses a service which uses a repository? is layered architecture too much for go?
Hey, that's not unthinkable but I would be wary of using too many layers and it might become hard to follow. I normally have a more flat architecture where I inject things on the same level if that makes sense
the example at 10:30 cannot be correct, the error is caused by the fact that there is no Currency item in the currencies map with key 'usd' at the time the go routine outside of the waiting group is running. If you add a 'usd' currency in the code above the error is gone and it prints the rates when it has the record whenever the thread has a chance to run. Also at 22:40 you say let's close the resultChan but the code below has close(currencyChan). The question is why closing only one? why not both or why any at all?
Hey guys!
The repo with the source code for this video is here: github.com/sigrdrifa/go-concurrency
And my NVIM config is here: github.com/sigrdrifa/nvim
누나. 예뻐요.
pin it
Great content, just wanted to point out not entirely correct information about difference in buffered and unbuffered channels. They are not about unlimited and limited data, but about blocking/unblocking operations.
Unbuffered channel sends one piece of data and current goroutine stops execution until another goroutine will read the data from the channel.
On the other hand, buffered channel allows execution until channel becomes full (the capacity parameter in make() function). When buffered channel is full it behaves like unbuffered channel until some goroutine will read some data from it.
Hope it was interesting for you. I’ve watched all your videos, good job!
I've been wanting to get started with Go these videos are really enjoyable. I enjoy your Non Go videos to. Keep spreading the joy of coding :)
This is the best practical example of concurrency in go I have ever seen. Great job, keep up 👍
Thanks for ur videos pls make more and more golang videos please.....
one of the bests videos about concurrency.
This was so helpful. Any chance you can do a video on context in go?
Thank you very much for making my requested video 🙏🏽. This is a good and clear real life use case.
I would also like to ask for another video about what are the differences using json.Marshal or json.Unmarshal and json. Encoder or json.Decoder in go. I know they both are used to convert go types to json and vice versa. But I don't know why and where to use one over the other. A video with some vivid/concrete examples of why and where to use each or reply to this comment could help me understand. Thank you in advance 🙏🏽.
You really are a Good teacher 💯
btw Love from India ❤
What is this life you are so damn smart 👩💻… this is so helpful.
Very useful and insightufl video, thanks MAN 😏😏
Thank you so much, absolutely excellent
what are your thoughts on following a pattern like main uses a handler which uses a service which uses a repository?
is layered architecture too much for go?
Hey, that's not unthinkable but I would be wary of using too many layers and it might become hard to follow. I normally have a more flat architecture where I inject things on the same level if that makes sense
Great examples, so helpful 😍
Excellent. Please keep doing
Honestly, it was all good until we got to worker pools. Then it was all confusing for me there after
😍😍😍😍
the example at 10:30 cannot be correct, the error is caused by the fact that there is no Currency item in the currencies map with key 'usd' at the time the go routine outside of the waiting group is running. If you add a 'usd' currency in the code above the error is gone and it prints the rates when it has the record whenever the thread has a chance to run.
Also at 22:40 you say let's close the resultChan but the code below has close(currencyChan).
The question is why closing only one? why not both or why any at all?