Pidoku
4Concurrency

Archive

This learning material is in the archive. It is not currently maintained and has not been updated with the latest information, so tool versions, prices and dates may be out of date.

Concurrency

Module 46 lessons~5h 40m

Lessons, in order

About this module

Goroutines are why most people choose Go. This module explains what one actually is, how the runtime runs millions of them on a handful of threads, and how to write concurrent code that is correct — not merely code that happens to pass its tests.

#LessonThe question it answers
4.aGoroutines and the SchedulerWhat is a goroutine, and who decides when it runs?
4.bChannelsWhat is a channel made of, and what do send, receive and close really do?
4.cSelect, Context and CancellationHow do I wait on several things and stop work that is no longer wanted?
4.dSync and AtomicsWhen do I use a mutex, an atomic or a channel?
4.eThe Memory Model and Data RacesWhat exactly is a data race, and what does Go guarantee?
4.fConcurrency PatternsHow are worker pools, pipelines and bounded concurrency built — without leaks?

When you finish you can draw the scheduler, predict what any channel operation does, write a cancellable worker pool, and explain why a program with a data race has no defined behaviour.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in