‹ BackHN Continuity

Thread

Go Concurrency Distilled

402 points · 187 comments · chmaynard

  1. rienbdj · · focus · HN ↗
    Is a Go channel equivalent to a Haskell tvar ?
    1. mrkeen · · focus · HN ↗
      Closer to mvar. Tvars support full transactional semantics.
    2. masklinn · · focus · HN ↗
      A go channel is just a queue with a configurable amount of buffering. Buffering 0 is the most interesting as it creates a “rendezvous” channel which syncs the sender and the receiver.

      A channel of size 1 is a bit like an mvar but with support for only take and put.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.