aio-libs / aio-libs/aiocache

Utilise eager_task_factory in python >= 3.12

オープン
#1,048 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
1.4k
フォーク
181
PR マージ指標
30日以内にマージされた PR はありません

説明

Since Python 3.12, asyncio introduced an eager task factory, which allows tasks to start executing immediately after being spawned, rather than waiting until the event loop schedules them.

I believe this could be useful in cases where the coroutine is just a simple cached value getter. Using eager tasks could reduce latency in situations where:

- The coroutine would otherwise be scheduled at the end of the queue, delaying an immediate result.
- Some other coroutines are blocking by mistake, and we’d still want cache hits to return quickly.

It's just an idea, but the implementation seems fairly straightforward. If no one else wants to try doing it, I will open a PR in 1-2 months, things have been pretty busy lately

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。