On this page
article
Async Queue
Producer-consumer with asyncio.Queue.
Category: asyncio
Problem
Producer-consumer with asyncio.Queue.
Solution
await queue.put(item); item = await queue.get()
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path