Producer and Consumer Threads
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- medium
- Pro
One thread reads lines from a huge log file and several worker threads parse them. Explain how to connect them with Python's queue module, how to stop memory filling up if the reader is faster than the workers, and how to shut the workers down cleanly at the end.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.