Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 1 | This page links to resources for learning about concurrency in Go. The items are presented in order, from beginner material to advanced topics. |
| 2 | |
| 3 | ## Beginner |
| 4 | - Read [Effective Go: Concurrency](https://golang.org/doc/effective_go.html#concurrency) |
Sameer Ajmani | f4f56c5 | 2018-10-31 09:26:49 -0400 | [diff] [blame] | 5 | - Watch [Simulating a real-world system in Go](https://www.dotconferences.com/2017/11/sameer-ajmani-simulating-a-real-world-system-in-go) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 6 | - Study [The Go Programming Language Specification](https://golang.org/ref/spec), especially |
| 7 | - [Go statements](https://golang.org/ref/spec#Go_statements) |
| 8 | - [Channel types](https://golang.org/ref/spec#Channel_types) |
| 9 | - [Send statements](https://golang.org/ref/spec#Send_statements) |
| 10 | - [Receive operator](https://golang.org/ref/spec#Receive_operator) |
| 11 | - [Select statements](https://golang.org/ref/spec#Select_statements) |
Sameer Ajmani | b1d7b91 | 2015-01-08 15:09:27 -0500 | [diff] [blame] | 12 | - Code [A Tour of Go: Concurrency](http://tour.golang.org/concurrency/1) |
Yesudeep Mangalapilly | c303ce2 | 2015-07-20 13:55:47 +0530 | [diff] [blame] | 13 | - Read [Fundamentals of Concurrency](https://www.nada.kth.se/~snilsson/concurrency/) |
Sameer Ajmani | 3a883e1 | 2015-01-09 09:23:46 -0500 | [diff] [blame] | 14 | - Read the [Frequently Asked Questions (FAQ)](http://golang.org/doc/faq), especially |
| 15 | - [Why build concurrency on the ideas of CSP?](http://golang.org/doc/faq#csp) |
| 16 | - [Why goroutines instead of threads?](http://golang.org/doc/faq#goroutines) |
| 17 | - [Why are map operations not defined to be atomic?](http://golang.org/doc/faq#atomic_maps) |
| 18 | - [What operations are atomic? What about mutexes?](http://golang.org/doc/faq#What_operations_are_atomic_What_about_mutexes) |
| 19 | - [Why doesn't my multi-goroutine program use multiple CPUs?](http://golang.org/doc/faq#Why_no_multi_CPU) |
| 20 | - [Why does using GOMAXPROCS > 1 sometimes make my program slower?](http://golang.org/doc/faq#Why_GOMAXPROCS) |
| 21 | - [What happens with closures running as goroutines?](http://golang.org/doc/faq#closures_and_goroutines) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 22 | |
| 23 | ## Intermediate |
Bryan C. Mills | 0903581 | 2018-08-31 13:43:31 -0600 | [diff] [blame] | 24 | - Study [Go by Example](https://gobyexample.com) from [goroutines](https://gobyexample.com/goroutines) through [stateful goroutines](https://gobyexample.com/stateful-goroutines) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 25 | - Watch [Go Concurrency Patterns](https://talks.golang.org/2012/concurrency.slide#1) |
Poh Zi How | b87d26d | 2019-01-06 03:05:13 +0800 | [diff] [blame] | 26 | - Watch [A Practical Guide to Preventing Deadlocks and Leaks in Go](https://www.youtube.com/watch?v=3EW1hZ8DVyw) |
Sameer Ajmani | 3a883e1 | 2015-01-09 09:23:46 -0500 | [diff] [blame] | 27 | - Read [Share Memory By Communicating](http://blog.golang.org/share-memory-by-communicating) and do the [codewalk](http://golang.org/doc/codewalk/sharemem/) |
| 28 | - Read [Go Concurrency Patterns: Timing out, moving on](http://blog.golang.org/go-concurrency-patterns-timing-out-and) |
| 29 | - Watch [Concurrency is not Parallelism](http://talks.golang.org/2012/waza.slide#1) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 30 | - Read [Go Concurrency Patterns: Pipelines and Cancellation](http://blog.golang.org/pipelines) |
Bryan C. Mills | 0903581 | 2018-08-31 13:43:31 -0600 | [diff] [blame] | 31 | - Read [Rethinking Classical Concurrency Patterns](https://github.com/golang/go/wiki/Go-Community-Slides#rethinking-classical-concurrency-patterns) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 32 | - Study [Package sync](https://golang.org/pkg/sync/) |
| 33 | - Read [Introducing the Go Race Detector](http://blog.golang.org/race-detector) |
Sameer Ajmani | 00425cd | 2015-01-09 13:52:48 -0500 | [diff] [blame] | 34 | - Watch [Go: code that grows with grace](http://talks.golang.org/2012/chat.slide#1) |
Bryan C. Mills | 0903581 | 2018-08-31 13:43:31 -0600 | [diff] [blame] | 35 | - Read [Mutexes and Semaphores Demystified](http://www.barrgroup.com/Embedded-Systems/How-To/RTOS-Mutex-Semaphore) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 36 | |
| 37 | ## Advanced |
宋昕晟 | 88cdc53 | 2018-07-12 15:42:50 +0800 | [diff] [blame] | 38 | - Watch [Advanced Go Concurrency Patterns](http://blog.golang.org/advanced-go-concurrency-patterns) |
| 39 | - Read [Advanced Go Concurrency Patterns](http://talks.golang.org/2013/advconc.slide#1) |
Sameer Ajmani | 6942db0 | 2015-01-08 14:40:13 -0500 | [diff] [blame] | 40 | - Read [Go Concurrency Patterns: Context](http://blog.golang.org/context) |
| 41 | - Study [The Go Memory Model](https://golang.org/ref/mem) |
| 42 | - Study [Package atomic](https://golang.org/pkg/sync/atomic/) |
Yesudeep Mangalapilly | ffd26e4 | 2015-08-03 20:56:45 +0530 | [diff] [blame] | 43 | - Read [Principles of Designing Go APIs with Channels](https://inconshreveable.com/07-08-2014/principles-of-designing-go-apis-with-channels/) |