Skip to content

Instantly share code, notes, and snippets.

@carlisia
Created July 10, 2016 19:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlisia/e4f4a745d87755634670b019f06947f0 to your computer and use it in GitHub Desktop.
Save carlisia/e4f4a745d87755634670b019f06947f0 to your computer and use it in GitHub Desktop.
Things Bill Say (about Go)

channels are slow, do not use it for synchronizing access

don't use channels as a queue

channels provide guarantees in your software for orchestration

channels: don't use for performance, use them for continuity: to keep things going

the channels are not the buffer. Goroutines can be the buffer.

if you can use a buffer channell with a guarantee that it's not gonna block, use it. think of a fan-out pattern. brilliant use of a buffer channel because we know exactly how many buffers we need. we are getting our continuity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment