Hey thank you. That’s kind of you to say. I’m really glad this video has helped so many people. Didn’t expect it. I’m happy that you found it helpful! 😊
I agree with everyone else's comments. You've done an incredible job of taking a complex and difficult to understand topic and make it clear with a great example demonstrating it. Thank you so much! You've also gained another subscriber.
One of the best I've seen. You are the rare type that can take complex concepts and explain them so well. I hope you continue to make this kind of great content!
Excellent tutorial. There are lot of very smart developers around, but very few who can teach a relatively complex subject in an easy fashion. Kudos, and keep posting.
brother thanks a lot , many concepts like goroutines, concurrent, time.Sleep , it's only been 6:12 and i had cleared all my concepts. I came to this video after watching 10 videos. Thanks you brother.
This is quite clear, even though I'm not a Go programmer. The music, however, is very distracting. Silence is the best accompaniment for an instructional video.
Hey thanks for the feedback! Actually, closing the channel isn't incorrect. In go, when you close the channel, the zero value for the channel's data type will get put onto the channel. So in this case, since the channel's data type is bool, when we close the channel in main, the message false gets put onto the channel. The for select loop in doWork will then receive that value and it will trigger the return. That's because "case
@kantancoding Thank you for your quick response. Yes you were right. The reason of the missing log was the missing sleep in the end of the main function. But another question pops up. In the following code if I remove the return statement, the app continuously logs "work done". Why is that ? It seems that the close function spamming the channel with messages. ``` package main import "fmt" import "time" func doWork(done
@@tzakarda Isn't that because we are relying on the channel to close our goroutine? If we get the value from the channel we manually close the function. That's the whole point of using the done channel. Since it's a for loop that is going to run forever, we are passing a done channel from the main function and it is unbuffered, when the goroutine can read from it, the function returns to close itself.
@Kantan, I'm definitely not regretting subscribing to this channel. I'm learning go and so far you have been a huge help for me to understand complex go concepts. Thank you sir :)
From now on, you've got one more subscriber. Great content. I can't wait for some more advanced topics like, dependency injection, dynamic typing (interface{}) etc. As a php programmer recently I rewrote one of my microservices, and I was amazed by ease of doing it just with go. Apart of painfully precise data types declaration, and luck of many useful generic functions present in php core, I had almost ecstatic pleasure. Most of the time I do hard core backend staff with data transfer and after speed comparison I fell in love with go 🙂
Welcome! Yeah Go is definitely a great language. It seems it’s starting to pick up in popularity and the topics you mentioned seem like good video ideas so I will add them to my backlog. Thank you for the valuable feedback and thank you for watching ❤️
Really struggling to focus on your voice and not the background music but the comments all say what an essential video this is so I'll keep trying. I hope you'll consider dropping the background music in future videos.
Yeah, I’ve received many complaints about it already so the rest of the videos in the series I have dropped the music. Unfortunately it can’t be removed retroactively. I hope that you can get through it!
Wow! One of the best tutorials into channels I have seen. Really great explanation of what is happening under the hood. For me the first half was a tiny bit boring because of too many details which I already know and which I think every adequate junior software engineer should be already aware of. The second half is perfectly balanced in terms of new material and under the hood explanations. Thanks!
Very cool demonstration. I'm just starting at Go but this is not my first language (I've been a backend developer for 12+ years). This language is getting more interesting at each new video I watch, this is exiting ^^
This explanation are really good, explained systematically from bottom to top, i came from frontend dev who dont know nothing about conccurent programming, even though i watch ZTM Golang i still cannot fully grasp the idea behind this Pattern. Love from indonesian bro, already liked videos also subscribed and shared!!
It was easy to understand. Finally I understand the logic behind using the concurrency. I used to see those mentioned in the project code base but didn't understand properly. Now I can implement my own :'). It was a nice video. I wanted to go through more but there are no more videos on golang 🥺 Sorry if I am greedy. I want to have more videos related to golang or design 🥺.
There actually is another video on Go that’s over 2 hours long: How To Structure Your Go App - Full Course [ Hex Arch + Tests ] ruclips.net/video/MpFog2kZsHk/видео.html Also, thanks for your comment. I’m glad that it helped 🙂
@@anistoryhindi Are you talking specifically for Go? I've already created some HLD videos. Will do more in the future but HLD isn't a language specific thing. And yeah, I have plans to make some kafka stuff. I have no experience with NSQ so at least for the time being, no plans for that.
Great video brother. Hope you keep it going. I suggest though that you make the videos in 10 minutes series instead of a single large chunk. It becomes pretty overwhelming and difficult to index when I am trying to refer to your videos when working on something. But ey, you just got yourself a subscriber
This was really great, I like the time you took to explain the difference between a bounded, and unbounded channel as it relates to async/sync behavior. Really useful
Yeah you definitely got a sub from me, there is something about your way of explaining things that just gets through and makes me understand and pick up new concepts quickly.
😂that’s awesome! Seems you are working with some advanced concepts. I’m currently working on some videos touching on more advanced concepts. Be on the lookout and thanks for watching! ❤️
There are 3 parts in this playlist so far. I’m not sure I’ll make a video specific to mutexes and wait groups since in most cases shared memory can be avoided. But I guess it depends on the need 🤔
Well, i didn't understand, how this pipeline is better than just calling functions one by one in a for loop? Are there any pros? I mean your pipeline is executed actually synchronously, but code is overcomplicated, isn't it? Is there any reallife scenario when this worth it? P.S. amazing video, awesome tutorial
So basically, I opted for a very simple example so that people can understand the concept of a pipeline without getting distracted by a bunch of complex logic. But if you imagine that the go routines for each stage do something time consuming, I think you can understand the benefit. For example, If both stage 1 and stage 2 do something time consuming, they will be able to work in parallel. That’s because stage 1 can put something on the channel that stage two is listening to. And then Stage 1 can start working on a new thing WHILE stage 2 is processes what stage 1 just put on the channel. So at this point they will be doing work in parallel. If you just loop through each item in the slice and call some functions consecutively without using go routines and channels like you mentioned, nothing will happen in parallel. The first function will execute and the second won’t be called until it’s finished. Then the second will execute and at that time the first function is basically blocked until the second finishes because you won’t go to the next iteration in the loop until the currently running function and whatever comes after it is finished... etc. I hope that makes sense. Kind of difficult to explain via text 😅
I loved the video a lot, but this clarification I consider is crucial to be mentioned. A simple time.Sleep injected to stages could illustrate the point. Else it is indeed raising questions why do pipelining for no (clear) benefit. Having said that I really loved the way you explain and presented your content. I know how much effort goes into creating content of such quality
again great video. I don't think you need background music of any sort, because that's distracting. You explanation is great and that's is enough to get us going as opposed to background music.
Good explanation. But about the pipeline, I just find it difficult to understand how it is more useful then looping directly through the slice and printing the square of each numbe. From what I understood, it does not even make it faster. I understand now how to do something like this, but when I am working on a project, I won't know when I should be using it
Thanks for the feedback! 😄 Yes, I will create more Go videos because Go is one of my favorite languages but this is not a Go specific channel. So for those that will be annoyed if I post videos unrelated to go, it's probably best not to subscribe 👍
Become a Golang Expert With This Hands-On Golang Course 👉 kantancoding.io
Fantastic. It is extremely rare to come across this level of concise and easy to follow explanation.
Thank you! 🙂
Best video I have found on the internet about Go concurrency. You really are great at not missing any important points while teaching. Salute.
Hey thank you. That’s kind of you to say. I’m really glad this video has helped so many people. Didn’t expect it. I’m happy that you found it helpful! 😊
the last part how you explained the go routines is mind blowing
this was a mind bending concept and cleared in a easy way
Thank you! I’m really happy that it helped 😊
agreed, my mind was blown as well
I agree with everyone else's comments. You've done an incredible job of taking a complex and difficult to understand topic and make it clear with a great example demonstrating it. Thank you so much! You've also gained another subscriber.
Thank you! I’m glad that it was helpful. I really hope that everybody can learn to make use of these features of the language 🚀
Excellent! This established a solid foundation to anybody who wants to understand concurrency not only for Golang but for any programming language.
I’m happy to hear that! Thank you 😊
One of the best I've seen. You are the rare type that can take complex concepts and explain them so well. I hope you continue to make this kind of great content!
Hey, this comment made my day! Thank you. I’m really happy to be able to help others understand complex things 🙂
I subscribed immediately lol. even I could understand the concepts
Incredibly clear explanation, by far the best on YT. Thanks a lot for all the effort!
Thank you! That means a lot 😊
Somehow youtube recommend me this and wasn't disapointed at all. Thanks for the awesome explanation!
That’s great to hear 🙂 I’m glad you liked it!
Hey man worth waiting keep posting such a quality content
Thanks bro! Glad you think so 🙂
As a newcomer to the world of Golang and goroutines, I loved every second of this video!
That’s great! I hope more people take up this great language! Thanks for watching my video 😊
Just wonderful! How a person be to meticulous in his work and care for his learners! Thanks a million!
Thank you for your kind words! I’m happy to help 🙂
Learned Go in 2017.
Never understood them until now.
Thank you!
Happy to help!
Finally, this tutorial gives me the aha moment with go channels. Terrific job. Very thorough explanations.
That’s great to hear! Thank you 😊
this tutorial/guide has more personality than the entire cast of friends
Lol I’m not sure if this is sarcastic or not but thanks 😂
Excellent tutorial. There are lot of very smart developers around, but very few who can teach a relatively complex subject in an easy fashion. Kudos, and keep posting.
Thank you! I’m really happy to hear that because it’s what I strive for 🙂
brother thanks a lot , many concepts like goroutines, concurrent, time.Sleep , it's only been 6:12 and i had cleared all my concepts. I came to this video after watching 10 videos. Thanks you brother.
😂 that’s great bro. I really try to explain things clearly so it makes me really happy to get this type of feedback 🙂
thank you. the principle of pipelines is great and your explanation is simple enough for newbies to understand.
Thank you for your kind words! I’m glad you enjoyed it 😊
This is quite clear, even though I'm not a Go programmer. The music, however, is very distracting. Silence is the best accompaniment for an instructional video.
Thanks for the feedback! It’s really helpful 🙂
This was fantastic and well explained. I now have a way better understanding of how channels and select statements work within Go. Great job.
Thank you! I’m glad it helped. Thanks for watching 🙂
This video finally cleared goroutine and channel for me. Watched so many videos prior to it hut was confused as hell.
😂🤣 I’m really happy to hear that. With go routines and channels under your belt, you can now take full advantage of the language 🚀
I think that example "The Done Channel" is not correct. Instead of call close(done) it should be done
Hey thanks for the feedback! Actually, closing the channel isn't incorrect. In go, when you close the channel, the zero value for the channel's data type will get put onto the channel. So in this case, since the channel's data type is bool, when we close the channel in main, the message false gets put onto the channel.
The for select loop in doWork will then receive that value and it will trigger the return. That's because "case
@kantancoding Thank you for your quick response. Yes you were right. The reason of the missing log was the missing sleep in the end of the main function.
But another question pops up. In the following code if I remove the return statement, the app continuously logs
"work done". Why is that ? It seems that the close function spamming the channel with messages.
```
package main
import "fmt"
import "time"
func doWork(done
@@tzakarda Isn't that because we are relying on the channel to close our goroutine? If we get the value from the channel we manually close the function. That's the whole point of using the done channel. Since it's a for loop that is going to run forever, we are passing a done channel from the main function and it is unbuffered, when the goroutine can read from it, the function returns to close itself.
@@tzakarda Because return is supposed to stop the for loop. If you've use OOP languages like javascript, you would understand better.
Definitely the best video about concurrency in go I've seen so far! 🤩
Thank you! I’m happy that it was helpful 😊
This is by far the best go channels explanation on RUclips. Good work, I love watching your very informative videos!
Wow, thanks! I’m happy to help 🙂
@Kantan, I'm definitely not regretting subscribing to this channel. I'm learning go and so far you have been a huge help for me to understand complex go concepts. Thank you sir :)
I’m really happy to hear that! Thanks for your comment 😊 it means a lot
From now on, you've got one more subscriber. Great content. I can't wait for some more advanced topics like, dependency injection, dynamic typing (interface{}) etc. As a php programmer recently I rewrote one of my microservices, and I was amazed by ease of doing it just with go. Apart of painfully precise data types declaration, and luck of many useful generic functions present in php core, I had almost ecstatic pleasure. Most of the time I do hard core backend staff with data transfer and after speed comparison I fell in love with go 🙂
Welcome! Yeah Go is definitely a great language. It seems it’s starting to pick up in popularity and the topics you mentioned seem like good video ideas so I will add them to my backlog. Thank you for the valuable feedback and thank you for watching ❤️
Great explanation! This video is the most helpful for me so far to understand concurrency in Go. Thanks, Mate!
That’s great to hear! Always happy to help 🙂
The best Golang teacher on RUclips literally
Hey thank you 😊 I’m happy to hear that it helps 🚀🙂
The best concurrency video I have watched so far! Good work!
Wow, thanks! Happy to help 🙂
You really put a lot of effort into this. Well done!
Thank you! I really do try so your words mean a lot 🙂
Really struggling to focus on your voice and not the background music but the comments all say what an essential video this is so I'll keep trying. I hope you'll consider dropping the background music in future videos.
Yeah, I’ve received many complaints about it already so the rest of the videos in the series I have dropped the music.
Unfortunately it can’t be removed retroactively. I hope that you can get through it!
Thanks! I did and it was super worth it
Man, How are you so good at this?
Kudos!
I agree with the comments. Best go concurrency video.
Well explained! Watched many Go Concurrency videos but this is the best one.
Glad you liked it!
Wow! One of the best tutorials into channels I have seen. Really great explanation of what is happening under the hood. For me the first half was a tiny bit boring because of too many details which I already know and which I think every adequate junior software engineer should be already aware of. The second half is perfectly balanced in terms of new material and under the hood explanations. Thanks!
Thanks for the feedback! I’m glad it was helpful 😊
This is like gold, thanks a lot for this valuable content
Thank you for supporting! 🙂
Very cool demonstration.
I'm just starting at Go but this is not my first language (I've been a backend developer for 12+ years).
This language is getting more interesting at each new video I watch, this is exiting ^^
That’s awesome! No language is perfect but I hope that you’ll come to enjoy this one as much as I have 😆
This explanation are really good, explained systematically from bottom to top, i came from frontend dev who dont know nothing about conccurent programming, even though i watch ZTM Golang i still cannot fully grasp the idea behind this Pattern.
Love from indonesian bro, already liked videos also subscribed and shared!!
Hey! Welcome and thanks for supporting bro. I’m happy that the videos have been helpful! 😀
the suspense music is so spot on aha Great tutorial, fab
😂 thank you!
The way you explained made it look so easy bro👏.
That’s great bro. I’m glad the explanation worked for you 😄
Soothing sound along soothing Explanation, just perfect.
Quality is just gold.
Thanks for watching! 😊
Really Good Explanation being a beginner in go i was able to understand everything you have taught for concurrency patterns
That’s awesome since that was what I was hoping for! Thank you for the feedback 😊
This video helped me a lot to clear my doubts. Thanks
That’s great to hear. Thank you 🙏
Extremely clear explanation on concurrency . Keep up the good work.
Thank you! I’m happy to help 😊
This is an expensive study material, I admire you🙏
Thank you! I hope that it will help you in your career 😎
It was easy to understand. Finally I understand the logic behind using the concurrency. I used to see those mentioned in the project code base but didn't understand properly. Now I can implement my own :').
It was a nice video. I wanted to go through more but there are no more videos on golang 🥺
Sorry if I am greedy. I want to have more videos related to golang or design 🥺.
There actually is another video on Go that’s over 2 hours long: How To Structure Your Go App - Full Course [ Hex Arch + Tests ]
ruclips.net/video/MpFog2kZsHk/видео.html
Also, thanks for your comment. I’m glad that it helped 🙂
@@kantancoding Will you be posting videos on backend technology? NSQ, KAFKA, HLD concepts etc?
@@anistoryhindi Are you talking specifically for Go? I've already created some HLD videos. Will do more in the future but HLD isn't a language specific thing.
And yeah, I have plans to make some kafka stuff. I have no experience with NSQ so at least for the time being, no plans for that.
@@kantancoding Not go specific I meant general :)
Great tutorial Brother. Got clarity in concurrency pattern. Thanks!
Awesome bro! I’m glad that it helped you find clarity 😊
Great video brother. Hope you keep it going.
I suggest though that you make the videos in 10 minutes series instead of a single large chunk. It becomes pretty overwhelming and difficult to index when I am trying to refer to your videos when working on something. But ey, you just got yourself a subscriber
Good point. It’s hard to sit through longer videos when the topics are complex. I’ll definitely keep this in mind! Thanks bro 🙏
This was really great, I like the time you took to explain the difference between a bounded, and unbounded channel as it relates to async/sync behavior. Really useful
Thank you! I’m really glad it helped you 🙂
Thank you and thanks to youtube algo for this recommendation
😂 happy that it found you! Thank you 🙂
Really useful video thank you. This has helped me alot trying to understand async programming in Rust. I've never written go.
That’s awesome that the video is also helpful for other languages. Thanks for the feedback! 🙂
one of the best video. you explain stuff very well
Thank you! I’m glad it helped 😊
Yeah you definitely got a sub from me, there is something about your way of explaining things that just gets through and makes me understand and pick up new concepts quickly.
That’s awesome! I’m glad it was helpful and thanks for the support!
Thanks kantan, coincidentally yours video help me to solve Producer-consumer problem.
😂that’s awesome! Seems you are working with some advanced concepts. I’m currently working on some videos touching on more advanced concepts. Be on the lookout and thanks for watching! ❤️
I'm glad I came across this tutorial.
Happy to help! Thanks for watching 😊
best video to explain how goroutins work. nice!
Thanks for watching 😊
thanks for the video bro, love the way you teach ❤️
Thank you bro! I’m happy to help 🙂
Really good explanation of buffered and unbuffered channels. Thanks
Thanks for watching!
This is the gem. Thanks
Thank you 😊
Incredibly easy to understand.....Thanks alot
Awesome! Happy to help 😊
God bless you, do more for us if possible.
Thank you 🙂 I will definitely try to do more 🚀
Buffered Channels are Send and Forget. That's a useful mental model.
Indeed!
Amazing video just what I was looking for!
Thank you! Happy to help 🙂
best content, In my learning golang journey.. awesome, mind blowing
Thank you for your kind words, I’m so glad it helped 🙂
Thank for you. You've just got yourself another subscriber.
Thank you 😊
Amazing just love to learn in your way....god bless you...🙏
Thank you so much 😀
Your tutorials so addictive, We want MORE!
Thank you 😊
Is there any topic in particular that you’re interested in?
great explanation, please make more of this!
Thank you! More videos coming soon 🙂
Next part with mutexes and wait groups I presume
There are 3 parts in this playlist so far. I’m not sure I’ll make a video specific to mutexes and wait groups since in most cases shared memory can be avoided. But I guess it depends on the need 🤔
Very clear tutorial, perfect.
Thank you! I’m glad it was helpful 🙂
Liked and subscribed. Very good explanation
(but the background music is little bit annoying and distracting)
Thanks for the feedback! I’m glad you liked it 🙂
@@kantancoding please never ever use that background music
Wow such a nice explaination .. loved it.
Thanks a lot 😊
Long time subscriber
Your videos never disappoint me
Happy to see people sticking around. Thank you for your support! 😊
Well, i didn't understand, how this pipeline is better than just calling functions one by one in a for loop? Are there any pros? I mean your pipeline is executed actually synchronously, but code is overcomplicated, isn't it? Is there any reallife scenario when this worth it?
P.S. amazing video, awesome tutorial
So basically, I opted for a very simple example so that people can understand the concept of a pipeline without getting distracted by a bunch of complex logic.
But if you imagine that the go routines for each stage do something time consuming, I think you can understand the benefit. For example, If both stage 1 and stage 2 do something time consuming, they will be able to work in parallel. That’s because stage 1 can put something on the channel that stage two is listening to. And then Stage 1 can start working on a new thing WHILE stage 2 is processes what stage 1 just put on the channel. So at this point they will be doing work in parallel.
If you just loop through each item in the slice and call some functions consecutively without using go routines and channels like you mentioned, nothing will happen in parallel. The first function will execute and the second won’t be called until it’s finished. Then the second will execute and at that time the first function is basically blocked until the second finishes because you won’t go to the next iteration in the loop until the currently running function and whatever comes after it is finished... etc.
I hope that makes sense. Kind of difficult to explain via text 😅
@@kantancoding hm, that's make sense. Thanks for explanation. I get it now. New concept for me as java developer =)
I loved the video a lot, but this clarification I consider is crucial to be mentioned. A simple time.Sleep injected to stages could illustrate the point.
Else it is indeed raising questions why do pipelining for no (clear) benefit.
Having said that I really loved the way you explain and presented your content. I know how much effort goes into creating content of such quality
Very impressed. More videos please
Thank you. Happy to hear! 😉
you are amazing teacher, the best !!
Thank you! I’m really glad it helped 😊
Very clear. Thank you!
No problem! Thanks for watching
again great video. I don't think you need background music of any sort, because that's distracting. You explanation is great and that's is enough to get us going as opposed to background music.
Nice. Thank you for this.
Great explanation. Thank you.
Thank you! Happy to help 😊
Thank you so much for your video 🙏🏻🌹
My pleasure! Happy to help 🙂
Great stuff, thank you for sharing.
Happy to help 😊 thanks for watching!
You're taking over👍
Thanks to you all supporting 😊
Keep Going Bro ♥
Thanks for the encouragement brother ❤️
A lightsaber cursor?! LOL, oh, that's cool!
😂 great minds think alike ❤️
vscode theme name ?
wonderful explanation thankyou!!
No problem 😌 thank you 😊
Is this really free? what great content and explanations. After paying for 4 GO courses, I landed in the right one now for free.
It’s free brother. Enjoy and thank you for watching 😊 🤯
Excellent explaination. Thanks sir🎉
Thanks for watching! Happy to help 😊
This is really a good video about handling concurrency , but please no more background sound :)
🤣yes, I wish I could remove it
great video mate!
Thanks! I’m glad it was helpful 😊
👏🏼👏🏼 subscribed and bell on
Awesome! Glad you enjoyed 🙂
One of the beat very helpful ❤
Thank you 😊
Best tutorial I found
Thank you! Happy to help 😊
GOAT content. Subscribed.
Thank you and welcome! 🤗
very clear I now understand channels thank you
Good explanation. But about the pipeline, I just find it difficult to understand how it is more useful then looping directly through the slice and printing the square of each numbe. From what I understood, it does not even make it faster. I understand now how to do something like this, but when I am working on a project, I won't know when I should be using it
Thanks for making this.
My pleasure. Thanks for watching 🙂
Do you plan to continue making videos about Go? I really enjoyed your explanation and the background music hit the right cord 👌🏻
Thanks for the feedback! 😄
Yes, I will create more Go videos because Go is one of my favorite languages but this is not a Go specific channel. So for those that will be annoyed if I post videos unrelated to go, it's probably best not to subscribe 👍
Great tutorial, thank you so much!
Happy to help! 😊
Liked and subscribed i dont think ill regret it !
Thank you 😊