On this page
article
Thread-Safe Queue
Share work between threads safely.
Category: queue
Problem
Share work between threads safely.
Solution
q = queue.Queue(); q.put(task); task = q.get()
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path