Curriculum Concurrency Sync primitives
Sync primitives
sync.Mutex, sync.RWMutex, sync.WaitGroup, sync.Once. The classical concurrency toolbox. Go's culture prefers channels for orchestration and sync for protecting state. Use whichever makes the code clearer; don't pick a side as a religion.
9 ready
01
pick one sync.Mutex is Go's classic mutual-exclusion primitive.
02
pick onePick the IDIOMATIC pattern for guarding access to a shared
03
pick one Pick the statement that's TRUE about sync.WaitGroup.
04
fill blanks Type the method name on sync.Mutex that ACQUIRES the
05
fill blanks Type the method on sync.WaitGroup that DECREMENTS the
06
type one line Write the two lines that guard count++ with the
07
type one line sync.Once runs a function exactly once across all
08
write a program Build a small program that uses sync.WaitGroup correctly:
09
write a programTheme 6.4 capstone + Module 6 capstone — pull together