https://github.com/asyncgui/asyncgui-ext-queue
An asyncio.Queue equivalent
https://github.com/asyncgui/asyncgui-ext-queue
Last synced: about 1 month ago
JSON representation
An asyncio.Queue equivalent
- Host: GitHub
- URL: https://github.com/asyncgui/asyncgui-ext-queue
- Owner: asyncgui
- License: mit
- Created: 2024-06-21T10:36:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-02T23:42:09.000Z (10 months ago)
- Last Synced: 2026-02-12T04:35:49.067Z (4 months ago)
- Language: Python
- Homepage: https://asyncgui.github.io/asyncgui-ext-queue/
- Size: 506 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Queue
An `asyncio.Queue` equivalent for asyncgui.
```python
import asyncgui as ag
from asyncgui_ext.queue import Queue
async def producer(q):
for c in "ABC":
await q.put(c)
print('produced', c)
async def consumer(q):
async for c in q:
print('consumed', c)
q = Queue(capacity=1)
ag.start(producer(q))
ag.start(consumer(q))
```
```
produced A
produced B
consumed A
produced C
consumed B
consumed C
```
## Installation
Pin the minor version.
```
poetry add asyncgui-ext-queue@~0.3
pip install "asyncgui-ext-queue>=0.3,<0.4"
```
## Tested on
- CPython 3.10
- CPython 3.11
- CPython 3.12
- CPython 3.13
- CPython 3.14