Skip to content
0:00 / 0:00

#goroutines#channels#csp

Google I/O 2012 - Go Concurrency Patterns

Google for Developers

2.6M subscribers • 20 videos on Hallway

YouTube
  • Recommended by 10 people: 9 on Hacker News and 1 curated list.
  • A classic. People kept recommending it from 2012 to 2025.
  • Presented by Rob Pike, co-creator of Go

Intermediate. Assumes working knowledge.

893K views14 years ago10 recommendations

Programming languagesSystems programmingGoConcurrency and parallelism

Rob Pike demonstrates how Go's concurrency primitives, goroutines and channels, can be used to elegantly solve complex concurrent programming problems.

Rob Pike Concurrency is the key to designing high performance network services. Go's concurrency primitives (goroutines and channels) provide a simple and efficient means of expressing concurrent execution. In this talk we see how tricky concurrency problems can be solved gracefully with simple Go code. For all I/O 2012 sessions, go to developers.google.com/io/

Why it's here

10 people recommend this

What people say. Highly recommended as a classic and essential talk for understanding Go's concurrency model and patterns.

mseepgoodon Hacker News • Recommends

On “Having a Go - first time experience with Golang”

Great talk by Rob Pike: link to this video "Go Concurrency Patterns" with cute little gophers playing Chinese whispers with megaphones

canthonytuccion Hacker News • Recommends

On “Less is exponentially more (2012)”

For those who don't know who Rob Pike is, he's pretty awesome, helped create UTF-8 among other things, and now works on Go. link He has given some really great Go talks which are available on youtube, about an hour each: Origins of Go Concurrency Style - link Lexical Scanning in Go - link Go Concurrency Patterns (One of my favorites) - link to this video

programming-talkscurated list on GitHubRecommends

Under “Go”

Go Concurrency Patterns 00:51:27 by **Rob Pike** (2012)

lurielon Hacker News • Recommends

On “Golang at CloudFlare”

In one word: channels. They might be theoretically equivalent to some degree, but in practice they are quite different, and I find reasoning about both concurrency and parallelism using goroutines and channels much more natural. Also see this talk by Rob Pike on the origins of Go's concurrency model here: link See also this article by Russ Cox about CSP: link And Rob Pike's latest talk about concurrency patterns at Google IO last week: link to this video

mseepgoodon Hacker News • Recommends

On “Why Node and Scala will dry up: Go will drink their milkshake”

I'm a fan of Go, but this is not a very good talk. The first half is unnecessary trolling, and the second half is based on some code snippets taken from Rob Pike's "Go Concurrency Patterns", but in this case badly presented. So I prefer the original: link to this video

danneuon Hacker News • Recommends

On “ClojureScript Core.async Todos”

You're responding to: > Clojurescript is the browser language I always > wanted. JS seems like such a hack. You're getting downvoted for reading into someone's enthusiastic personal endorsement and then ending it with the tiring "Tell me something good about <thing I refuse to read or understand on my own time but I'll partake in discussion anyways>...". Start with Rob Pike's "Go Concurrency Patterns" ( link to this video )

arayon Hacker News • Recommends

On “Go Concurrency Patterns: Pipelines and cancellation”

Great explanation in document form of these patterns. Also very succinct and easy to reference. For those that would rather read this in presentation form: link And for those that would rather watch a video presentation: link to this video

srcreighon Hacker News • Recommends

On “Go support for Android”

In my experience with Android apps, I've almost never had to use the NDK. When I did have to use the NDK, it wasn't because I wanted to code in C/C++---it was because there were strong, open-source libraries written in C/C++ that I wanted to use in an app (Though, I have no experience making games on Android). If you want to check out Go, then the Go Tour 1 and the various talks by Rob Pike 2 3 / Sameer Ajmani 4 are great resources. The Go Tour stands on its own as an interest-building resource; the several programming exercises it has you do are fun and challenging. 1: link 2: link to this video 3: link 4: link

staunchon Hacker News • Recommends

On “Ask HN: Concurrency in Go vs. C/C++”

Rob Pike did a number of interesting talks on concurrency in Go. If you search "Go concurrency" on YouTube there are more good talks. Go Concurrency Patterns link to this video Concurrency Is Not Parallelism link

gunapologist99on Hacker News • Recommends

On “What's New in Python 3.11?”

…a first-class and extremely powerful feature of the language. You can even run a for loop over them, block or not block while waiting for an incoming message, etc. Here's a great video that talks about use cases and the patterns in using them, and they pair great with goroutines (and you don't have to sprinkle async before every function, either): link to this video…

pbohunon Hacker News • Recommends

On “A million ways to die from a data race in Go”

…w their consumer in the CSP model. Channels can even be passed around to other goroutines! Each have their own pros and cons. You can see some of the legends who invented different methods of concurrency here: link There's also a nice talk Rob Pike gave that illustrated some very useful concurrency patterns that can be built using the CSP model: link to this video…

u/HellHathNoFlurryin r/Clojure • Mentions

Equivalent of select in core.async? I'm watching Rob Pike's *excellent* presentation Go Concurrency Patterns and implementing his examples in Clojure as a way to learn `core.async` better. At 22:47 he gives an example of using `select` in Go with a timeout that causes the function to exit: func main() { c := boring("Joe") for { select { case s := <-c: fmt.Println(s) case <-time.After(1 * time.Second): fmt.Println("You're too slow.") return } } } What's the best equivalent in Clojure? This is what I came up with using `alts!!`: (defn main [] (let [c (boring "Joe")…

mseepgoodon Hacker News • Mentions

On “Will Go be the new go-to programming language?”

The "Talks and Videos" page ( link ) is outdated as well. Here's my personal list: Why Learn Go? link Short interview with Rob Pike, OSCON 2012 Get Started with Go link Andrew Gerrand A Tour of Go link Russ Cox Go Concurrency Patterns link to this video Rob Pike, Google I/O 2012 Goroutines, Channels Meet the Go Team link Panel (Pike, Thompson, Griesemer, Gerrand, Fitzpatrick, Simons), Google I/O 2012 Computing Map Tiles with Go on App Engine link Chris Broadfoot, Andrew Gerrand, Google I/O 2012 Go in Production link Gustavo Niemeyer, Google I/O 2012 Go: Code that grows with grace link (Contains some audio glitches) Andrew Gerrand Interview with Rob Pike link Rob Pike, GOTO Conference…

ralphon Hacker News • Mentions

On “Go Bloviations”

Agreed, Rob Pike, in his search engine example at Google's I/O 2012 IIRC, made the explicit point that mutexes are there and that channels are for joining large concurrent parts of the program together; guarding a data structure seems too small even though it's a common (toy?) example. link to this video

Ezraon Hacker News • Mentions

On “Go concurrency patterns”

Video of rob giving the talk: link to this video this makes use of the excellent "Golang Present Tool", which makes most of the code on the slides executable.1 1: link

bioton Hacker News • Mentions

On “Go concurrency patterns”

Rob Pike has a Q&A at the end of his video where he answers (what sounds like) the exact same question you ask: link to this video Essentially, it gets garbage collected without you having to worry about it unless you're doing something fairly special.