`TrioExecutor` acquires the capacity limiter too many times.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 43/100
Direzione di ricerca
Start with the TrioExecutor entry point named in the issue and run the provided reproducible example to observe the blocking call. Trace how the executor and the inner trio.to_thread.run_sync call acquire capacity, then verify that the example completes with max_workers=1 without consuming the same capacity twice.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
TrioExecutor shares the limiter with the underlying trio.to_thread.run_sync call, so more tokens are consumed than are intended.
Reproducible example:
import asyncio
import trio_asyncio
async def amain():
loop = asyncio.get_event_loop()
executor = trio_asyncio.TrioExecutor(max_workers=1)
await loop.run_in_executor(executor, print, "hello")
trio_asyncio.run(trio_asyncio.aio_as_trio(amain))
This call will always block, as TrioExecutor acquires the only token available and the inner trio.to_thread.run_sync cannot acquire its own token.
- Lingua principale
- Python
- Stelle
- 204
- Fork
- 42
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-trio/trio-asyncio
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
python-trio/trio-asyncio#160 · 4 commenti · 8 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
python-trio/trio-asyncio#159 ·
-
TrioChildWatcher inherits asyncio.AbstractChildWatcher, which is deprecated as of Python 3.12Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
python-trio/trio-asyncio#152 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
python-trio/trio-asyncio#136 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
python-trio/trio-asyncio#133 · 7 commenti ·
Tutte le issue di python-trio/trio-asyncio
Issue simili
-
area: agents area: docs good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
openapi/gknowledge#23 ·
-
get() for StrEnumForse già presa @FeJo5952 l’ha presa oggi. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
collective/icalendar#1921 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Improvement Python Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-python#7994 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
alphagov/notifications-api#5004 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
equinor/radix-flux#3922 ·
I maintainer di solito rispondono entro 1 giorno