Go Concurrency Patterns

Test your understanding of Goroutines,channels,and concurrency patterns in Go.

1. What is the primary keyword used to start a concurrent execution in Go?
2. Which of the following are synchronization primitives provided by the sync package?
3. A goroutine is managed by the operating system kernel.
4. What package provides the WaitGroup type for synchronizing goroutines?
5. Which pattern involves multiple goroutines processing tasks and sending results to a single channel?
6. Which operations on an unbuffered channel block until the other side is ready?
7. The select statement can execute multiple case clauses simultaneously.
8. What method of sync.WaitGroup is used to decrement its counter when a goroutine finishes?
9. What is the primary purpose of the context package?
10. Which of the following are considered Go concurrency patterns?
11. A buffered channel with capacity 3 blocks when sending the 4th element without a corresponding receive.
12. What keyword is used to declare a channel variable in Go?
13. Which statement allows a goroutine to wait on multiple channel operations?
14. Which are characteristics of unbuffered channels?
15. The sync.Mutex type provides exclusive access to shared resources.
16. What happens when you send a value to a closed channel?
17. Which pattern limits the number of operations allowed in a given time period?
18. Which methods are part of sync.WaitGroup?
19. Goroutines continue executing after the main function exits.
20. What term describes the pattern where a single goroutine distributes tasks to multiple worker goroutines?
Answered 0 of 0 — 0 correct