Software Architecture in Golang: Choreography Pattern

Поділитися
Вставка

КОМЕНТАРІ • 9

  • @aidantilgner
    @aidantilgner 2 роки тому +1

    This content is exactly what I've been looking for, thank you!

    • @MarioCarrion
      @MarioCarrion  2 роки тому +1

      Aidan, I'm glad you found it useful. Cheers

  • @GabrielPozo
    @GabrielPozo 9 місяців тому

    Thanks for sharing!

  • @typeer
    @typeer 2 роки тому

    Ty for posting all this, learned lots

    • @MarioCarrion
      @MarioCarrion  2 роки тому

      Thanks Tristan, I'm glad it worked for you. Take care.

  • @mbesida
    @mbesida Рік тому

    Hi, how do you share waitgroups between goroutines? From the video i see that you do not use pointers for wg. Doesn't that mean that each goroutine will get a new copy of a wait group?

    • @MarioCarrion
      @MarioCarrion  Рік тому

      The waitgroups are not pointers because they are declared locally to where they are used; notice the goroutine uses an anonymous function, so everything inside that block is still pointing to the same memory address. If the declaration of "func(val int64)" was outside of "main()", then that function would have to be changed to "func(val int64, c *Choreographer, wgSubs *sync.WaitGroup, wg *sync.WaitGroup)" .
      You can confirm this by printing their memory address using "fmt.Printf("%p", &wgXYZ")", you will see they are the same.

  • @TheDavBag
    @TheDavBag 2 роки тому

    not sure about two wait groups :)
    that feels heavy

    • @MarioCarrion
      @MarioCarrion  2 роки тому +1

      Yes, I totally agree with you. Like I said in the video, I don't recommend any of this for production :)