Channels and Deadlock in golang

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • 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/hiteshdo...
    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...

Комментарии • 38

  • @susangeorge1318
    @susangeorge1318 3 года назад +12

    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 2 года назад +1

    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.

  • @adityanigam8373
    @adityanigam8373 4 месяца назад

    Thanks for the beautiful explanation!

  • @pedroreisbr
    @pedroreisbr 2 года назад

    Thank you for this course Hitesh!

  • @rajathmr4171
    @rajathmr4171 9 месяцев назад +1

    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?

  • @soniapaul288
    @soniapaul288 3 года назад

    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.

  • @Vikas-dm9uc
    @Vikas-dm9uc Год назад

    Really awesome series bhaiya, bt can u pls make a little more detailed video about these channels.

  • @junaidkhalidi-mw1zs
    @junaidkhalidi-mw1zs Год назад +2

    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 2 года назад

    Very nice and thanks for covering all points

  • @abhaysingh.632
    @abhaysingh.632 Год назад

    Thank you sir, it was an amazing journey

  • @kavinderpanwar1434
    @kavinderpanwar1434 Год назад

    Amazing course content, thankyou

  • @pravinbudage3942
    @pravinbudage3942 3 года назад

    You have explained the things very well. Thanks

  • @usmanarif5707
    @usmanarif5707 3 года назад

    Awesome content as usual. Stay blessed brother❤️

  • @djharshal0007
    @djharshal0007 2 года назад

    Very informative 👌🏻👍🏻

  • @nsg2945
    @nsg2945 9 месяцев назад

    please add some adding testcases videos too to make it complete course .
    Thanks

  • @HSharpknifeedge
    @HSharpknifeedge 2 года назад

    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!

  • @YouAndImpact
    @YouAndImpact 3 года назад

    Great video 👍

  • @mridulbagla
    @mridulbagla 3 года назад

    Thank you sir for this series

  • @danielvega646
    @danielvega646 7 месяцев назад

    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!

  • @asimrehman4475
    @asimrehman4475 3 года назад

    Hitesh Sir, Kindly can you make the video on refactoring topics in Golang?

  • @himanshutariyal7648
    @himanshutariyal7648 2 года назад

    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 Год назад +1

      It totally depends on the go scheduler, similar to threads in java. Its totally random depends on the scheduler.

    • @ankitsagar255
      @ankitsagar255 11 месяцев назад

      you can create separate channels, and listen to specific channel in respective goroutine

  • @mokshitvohra9004
    @mokshitvohra9004 Год назад

    any video on select

  • @杨基根-h7w
    @杨基根-h7w 2 года назад

    thanks a lot.

  • @cruiserider7263
    @cruiserider7263 2 года назад

    Go is pure love

  • @surajmaity6194
    @surajmaity6194 2 года назад

    Amazing

  • @anilkumargoli5167
    @anilkumargoli5167 2 года назад

    i think u used the Mych for closing instead ch ,that is reason it is not closing

  • @bhumit070
    @bhumit070 3 года назад +1

    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 3 года назад +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 3 года назад

      nums1 := 5
      nums2 := 5
      squareOf2 := func(num1, num2 int) int {
      return nums1 * nums2
      }(nums1, nums2)
      fmt.Println(squareOf2)
      Try this for example

    • @flexairz
      @flexairz 3 года назад

      Better watch the video again.

    • @mridulbagla
      @mridulbagla 3 года назад

      @@susangeorge1318 Thanks, I was also getting confused in this but now it is clear.

    • @dhanushs1802
      @dhanushs1802 2 года назад +1

      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)

  • @anywheredoor4699
    @anywheredoor4699 Год назад

    What is the use case of a channel, I mean why do we want our go routines to talk while executing

    • @aradhymishra1861
      @aradhymishra1861 Месяц назад

      I think so that they can synchronize shared storages effectively

  • @Zahid110-r7u
    @Zahid110-r7u 3 года назад

    Sir 1 ishu task app process debug ManiMan fast how to solve please reply me