Homework 5: Goroutines


Use goroutines and channels to build sophisticated concurrency primitives. You will almost certainly need to refer to the Go documentation.


Complete the exercises in the hw5.go code file stub.

Make sure that your code does not result in any data races, hanging goroutines, or use of shared state. Static analysis tools like go vet may help.

Be sure that your code is run through gofmt and compiles successfully before submitting. You will be learning many Go best practices throughout the semester that you will be expected to follow.


You should submit your hw5.go to Canvas when you are done.

NOTE: Please submit only the completed hw5.go file, nothing else.