Module 07 of 12

Concurrency: Goroutines & Channels

Lessons

About This Module

Concurrency is one of the main reasons people choose Go. The language has it built in: you can run many tasks at once with lightweight goroutines and let them communicate safely through channels, without writing low-level thread code.

This module starts with an overview of concurrency in Go. It then covers goroutines and WaitGroups, how to start work in the background and wait for it to finish, and moves on to channels, including the difference between unbuffered and buffered channels.

Watch the lessons in order and run the examples yourself, since concurrent code is easiest to understand by seeing it behave, then continue on to Concurrency Patterns.

Lessons

4 videos
01

Go Concurrency Explained: Go Routines & Channels

A first overview of how concurrency works in Go and how goroutines and channels fit together.

02

Introduction to Concurrency in Go: Master Goroutines & WaitGroups

Starting goroutines and using sync.WaitGroup to wait for them to finish.

03

Channels in Go language: Go programming language tutorial (30)

Channels in Go: how goroutines send and receive values to communicate with each other.

04

#24 Golang - Concurrency: Unbuffered vs Buffered Channels

The difference between unbuffered and buffered channels and when each one is the right choice.