RANIARANIA Academy

Concurrency — Goroutines & Channels

Learn to write concurrent Go programs safely using goroutines, channels, select, the sync package and context. You will coordinate parallel work, cancel and time-out tasks, build worker pools, and prove your code is race-free with Go''s built-in race detector.

Watch the free preview

Goroutines — launching concurrent work — free to watch, no account needed.

Go (Golang) INTERMEDIATE · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Write concurrent Go programs safely using goroutines and channels
  • Coordinate goroutines with unbuffered and buffered channels, select and channel closing
  • Synchronise shared state with the sync package (WaitGroup and Mutex)
  • Cancel and time-out concurrent work using the context package
  • Build worker pools and prove code is race-free with the Go race detector

Syllabus

Goroutines and the Basics of Concurrency
Goroutines — launching concurrent workFree preview15 min
Unbuffered channels — communicating between goroutines15 min
Channels in Depth
Buffered channels, closing and ranging15 min
select — multiplexing multiple channels15 min
Synchronisation with sync and context
The sync package — WaitGroup and Mutex15 min
context for cancellation and timeouts15 min
Patterns and Safety
Worker pools and pipelines15 min
Race detection and common concurrency pitfalls15 min
Lab — 10 Exercises & Solutions
Exercises 1–515 min
Exercises 6–1015 min