Challenge: Write Code with Worker Pool Pattern
Explore how to implement the worker pool concurrency pattern in Go by creating multiple workers to process jobs in parallel. Understand how to use channels and WaitGroup to coordinate tasks, calculate digit sums of random integers, and manage job assignments without global variables.
We'll cover the following...
We'll cover the following...
Problem statement
Write code that generates random integers less than or equal to 1,000 and calculates the sum of digits of each of the integers while following the instructions below:
- Don’t create any global variables.