‹ BackHN Continuity

Thread

Go Concurrency Distilled

402 points · 187 comments · chmaynard

  1. SamInTheShell · · focus · HN ↗
    The concurrency and threading in Go just feels like magic compared to every other language. I'm a goroutine addict and I refuse to be rehabilitated.

    Just from observations over the years, I don't think there's any other language quite like this, in terms of how things can end up happening in any thread.

    1. tym0 · · focus · HN ↗
      We're heavy user of Go at work. Go also makes it way to easy to write bad concurrent code and hard to write good one.

      Stick to err/wait group and go routines and it's OK. Any PR with a channel or mutex I'll assume the author made a mistake.

      1. lolpython · · focus · HN ↗
        Asking as an outsider to Go. How do you communicate between threads without a channel or mutex?
        1. osigurdson · · focus · HN ↗
          A goroutins shares memory so you can just share variables if you want. It is basically the same as any other language in this regard.
          1. osigurdson · · focus · HN ↗
            Haha! Laughing at my own comment: "a goroutins shares memory". The iPhone keyboard wins again.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.