phase 1 · 1.5-goroutines-channels
Goroutines, channels, the intentional race
prereqs
1.4-pointers-slices-maps
The lesson for this task hasn't been written yet. The mastery criteria below is the shortest description of what you'll own when this task is green.
Mastery criteria
- Concurrent word counter: chunk → goroutine → channel aggregate
- Demonstrate a data race with `go test -race`; fix with sync.Mutex
- Refactor the same fix with channels; articulate which you'd ship and why
- Contrast: what's different about goroutines vs JavaScript async/await
Verify
Run from your go-dojo repo root:
go-dojo verify 1.5-goroutines-channels
This runs the task's go test suite in exercises/phase-1/1.5-goroutines-channels/, commits the attempt to .go-dojo/attempts/, and updates your mastery.