Curriculum Concurrency Goroutines
Goroutines
go fn() runs fn concurrently with the caller. That's it. No promises, no async/await, no event loop — the runtime multiplexes goroutines over OS threads. Cheap to start (kilobytes of stack). And the discipline: never start a bare goroutine whose lifetime you can't reason about.
Exercises
9 ready
01
pick one
Pick the line that starts worker() running concurrently with
02
pick one
Pick the statement that is TRUE about goroutines.
03
pick one
A goroutine you launch in main() runs concurrently with
04
fill blanks
Type the keyword that launches a function call as a goroutine.
05
fill blanks
The ${word} keyword can also be used with anonymous
06
type one line
Write the launch line — start an anonymous function as a
07
type one line
Write the wg.Done() call inside the worker goroutine. The
08
write a program
Build a small program demonstrating goroutine + done-channel
09
write a program
Theme 6.1 capstone — fan-out three goroutines with