https://github.com/asyncgui/asynckivy-ext-queue
Queue (fifo, lifo, priority)
https://github.com/asyncgui/asynckivy-ext-queue
asynckivy kivy
Last synced: 11 months ago
JSON representation
Queue (fifo, lifo, priority)
- Host: GitHub
- URL: https://github.com/asyncgui/asynckivy-ext-queue
- Owner: asyncgui
- License: mit
- Archived: true
- Created: 2023-10-25T11:41:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T03:48:03.000Z (over 1 year ago)
- Last Synced: 2025-07-07T01:20:30.469Z (12 months ago)
- Topics: asynckivy, kivy
- Language: Python
- Homepage: https://asyncgui.github.io/asynckivy-ext-queue/
- Size: 471 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Warning
This library has been archived in favor of [asyncgui_ext.synctools](https://github.com/asyncgui/asyncgui-ext-synctools).
# Queue
Extension for `asynckivy` programs.
```python
from kivy.app import App
import asynckivy as ak
from asynckivy_ext.queue import Queue
async def producer(q):
for c in "ABC":
await q.put(c)
print('produced', c)
q.half_close()
async def consumer(q):
async for c in q:
print('consumed', c)
q = Queue(capacity=1)
ak.start(producer(q))
ak.start(consumer(q))
App().run()
```
```text
produced A
consumed A
produced B
consumed B
produced C
consumed C
```
## Installation
It's recommended to pin the minor version, because if it changed, it means some *important* breaking changes occurred.
```text
poetry add asynckivy-ext-queue@~0.2
pip install "asynckivy-ext-queue>=0.2,<0.3"
```
## Tested on
- CPython 3.9 + Kivy 2.2.1
- CPython 3.10 + Kivy 2.2.1
- CPython 3.11 + Kivy 2.2.1