Channels and Deadlock in golang

  Рет қаралды 23,946

Hitesh Choudhary

Hitesh Choudhary

2 жыл бұрын

Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
All the learning resources such as code files, documentations, articles and community discussions are available on our website:
chaicode.com/
You can find our discord link, github link etc on the above website.
Twitter/X link: x.com/hiteshdotcom
Discord link: hitesh.ai/discord
Learn React with 10 projects: • Let's learn react from...
Learn Docker: • A practical guide on D...
Learn Kubernetes: • Complete Kubernetes Co...
How does a browser works: • How does a browser wor...
How nodejs works: • How node JS works | En...
Learn Redux-toolkit: • Learn Redux Toolkit in...
Learn NextJS: • Nextjs Full stack course
Learn Typescript: • Why to learn Typescript
Learn Javascript: • Welcome to new JavaScr...
Learn React Native: • React Native Mastery: ...
Learn Zustand: • React state management...
Learn Golang: • How to get started wit...

Пікірлер: 36
@susangeorge1318
@susangeorge1318 2 жыл бұрын
Thank you Sir for this awesome course.If possible could you make a short video precisely only for channels & go routines explaining its real world implementation to understand it better.Also some exercises or activities would help. Thank you once again.
@SaintMrDog
@SaintMrDog Жыл бұрын
One of the pivotal points of channels not mentioned is from the CTX or context package. Channels depending on the application can hang and you will want a want to kill them so your application can continue. CTX provides a timeout feature for such cases. Amongst a lot of other featues.
@pedroreisbr
@pedroreisbr 2 жыл бұрын
Thank you for this course Hitesh!
@pravinbudage3942
@pravinbudage3942 2 жыл бұрын
You have explained the things very well. Thanks
@usmanarif5707
@usmanarif5707 2 жыл бұрын
Awesome content as usual. Stay blessed brother❤️
@junaidkhalidi-mw1zs
@junaidkhalidi-mw1zs Жыл бұрын
At last you said totally a different video can be made on structuring an application in Go. please make video on structuring an application with go . Big request.
@balanepalaiyathane9714
@balanepalaiyathane9714 Жыл бұрын
Very nice and thanks for covering all points
@kavinderpanwar1434
@kavinderpanwar1434 Жыл бұрын
Amazing course content, thankyou
@abhaysingh.632
@abhaysingh.632 Жыл бұрын
Thank you sir, it was an amazing journey
@Vikas-dm9uc
@Vikas-dm9uc Жыл бұрын
Really awesome series bhaiya, bt can u pls make a little more detailed video about these channels.
@djharshal0007
@djharshal0007 Жыл бұрын
Very informative 👌🏻👍🏻
@YouAndImpact
@YouAndImpact 2 жыл бұрын
Great video 👍
@rajathmr4171
@rajathmr4171 2 ай бұрын
Hey I watched the whole playlist its amazing, in this video I have on dobut in both of the go Routines you are saying ch as prototype for what reason? is it to make these Routines as Read Only or Send Only?
@asimrehman4475
@asimrehman4475 2 жыл бұрын
Hitesh Sir, Kindly can you make the video on refactoring topics in Golang?
@soniapaul288
@soniapaul288 2 жыл бұрын
All likes, not a single dislike yet, very nice. The first thing comes into mind with 'Channels', is related to Medical, injecting fluids into human body.
@nsg2945
@nsg2945 3 ай бұрын
please add some adding testcases videos too to make it complete course . Thanks
@user-iu3ip4dj5w
@user-iu3ip4dj5w 2 жыл бұрын
thanks a lot.
@mridulbagla
@mridulbagla 2 жыл бұрын
Thank you sir for this series
@HiteshChoudharydotcom
@HiteshChoudharydotcom 2 жыл бұрын
🙂
@surajmaity6194
@surajmaity6194 Жыл бұрын
Amazing
@danielvega646
@danielvega646 Ай бұрын
To be honest, programming the web makes more sense than OOP with this brand new paradigm of concurrency that Go offers us. Is like a more natural logic, it feels closer to how we experiment the reality: you don't go around and live making everything a component or object and relate it with other objects, if you do it so, it's because of living too much time developing under OOP paradigm, but the common sense is more like the concurrency: you do multiple tasks at a time and you are just the main channel retrieving data from multiple processes and based on the data you do one thing, stop another and so on. What do you guys think? I like OOP, is cool and functional, has passed the test of times and empires have been raised up on technologies with this paradigm, but haven't you sometimes felt cumbersome and overengineered a solution made on OOP? Like wow, so many code, so many files, names, classes, layers and steps through just for uploading a damn file!
@mokshitvohra9004
@mokshitvohra9004 Жыл бұрын
any video on select
@HSharpknifeedge
@HSharpknifeedge Жыл бұрын
Dude one way to explain it to your viewers is: have you used pipes in Linux? the LValue is the sender, the Pipe is channel, and the RValue is the receiver and surprisingly is the sender has nothing more to deliver to the receiver, then the channel is closed!
@cruiserider7263
@cruiserider7263 2 жыл бұрын
Go is pure love
@anilkumargoli5167
@anilkumargoli5167 2 жыл бұрын
i think u used the Mych for closing instead ch ,that is reason it is not closing
@himanshutariyal7648
@himanshutariyal7648 Жыл бұрын
One question, if we have multiple go routines and one of them is emitting data while other are listening to it, then how will we know which routine will get which data ? go func1 ( listener ) go func2 ( listener ) go func3 ( emitter ) { emits( val1 ); emits( val2 ); } How will we know which value goes to which function ?
@deveshagarwal7455
@deveshagarwal7455 Жыл бұрын
It totally depends on the go scheduler, similar to threads in java. Its totally random depends on the scheduler.
@ankitsagar255
@ankitsagar255 5 ай бұрын
you can create separate channels, and listen to specific channel in respective goroutine
@anywheredoor4699
@anywheredoor4699 Жыл бұрын
What is the use case of a channel, I mean why do we want our go routines to talk while executing
@smoothreflexsongs5111
@smoothreflexsongs5111 2 жыл бұрын
Sir 1 ishu task app process debug ManiMan fast how to solve please reply me
@bhumit070
@bhumit070 2 жыл бұрын
Hello sir you gave ch in function and accessed myChannel in function how is it working I am not getting I tried to do it but got an error
@susangeorge1318
@susangeorge1318 2 жыл бұрын
It is a anonymous function hence although we have declared parameter as ch but we are passing the already declared myCh hence it doesn't matter which variable u pass the value will be the same.Hope it helps.
@susangeorge1318
@susangeorge1318 2 жыл бұрын
nums1 := 5 nums2 := 5 squareOf2 := func(num1, num2 int) int { return nums1 * nums2 }(nums1, nums2) fmt.Println(squareOf2) Try this for example
@flexairz
@flexairz 2 жыл бұрын
Better watch the video again.
@mridulbagla
@mridulbagla 2 жыл бұрын
@@susangeorge1318 Thanks, I was also getting confused in this but now it is clear.
@dhanushs1802
@dhanushs1802 2 жыл бұрын
You are correct, it works as mentioned in the above comments but he should have used ch. And that is also the reason he didn't get syntax highlight when he tried to close the receive only channel (he admits that around 17:20)
Math, crypto and random number in golang
13:18
Hitesh Choudhary
Рет қаралды 16 М.
Grouping in mongodb
24:51
Hitesh Choudhary
Рет қаралды 25 М.
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 42 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 68 МЛН
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 20 МЛН
GopherCon 2017: Kavya Joshi - Understanding Channels
21:45
Gopher Academy
Рет қаралды 114 М.
Rust Axum Production Coding (E01 - Rust Web App Production Coding)
3:53:02
Golang Channels Or Wait Groups? Let Me Explain.
18:32
Anthony GG
Рет қаралды 20 М.
Advanced Golang: Channels, Context and Interfaces Explained
22:17
Code With Ryan
Рет қаралды 114 М.
How to consume JSON data in golang
13:42
Hitesh Choudhary
Рет қаралды 27 М.
Go Class: 23 CSP, Goroutines, and Channels
40:59
Matt KØDVB
Рет қаралды 24 М.
Handling routes and testing routes in golang
20:25
Hitesh Choudhary
Рет қаралды 16 М.
JWT token based authentication/authorization in Golang (REST API's)
30:02
Daily Code Buffer
Рет қаралды 37 М.
Лучший браузер!
0:27
Honey Montana
Рет қаралды 903 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 1,5 МЛН
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,2 МЛН