Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGosync.WaitGroupSingle-choice MCQ

What does this program print, given that copying a WaitGroup after first use is disallowed?

func run(wg sync.WaitGroup) { defer wg.Done() // do work } func main() { var wg sync.WaitGroup wg.Add(1) go run(wg) wg.Wait() fmt.Println("done") }