we (web engine): Experimental web browser project to understand the limits of Claude
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Review fixes: simplify double mutex lock in take_completed_fetches

Replace check-then-take double-lock pattern with a single lock().take()
call, eliminating unnecessary mutex re-acquisition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+2 -6
+2 -6
crates/js/src/fetch.rs
··· 65 65 let mut still_pending = Vec::new(); 66 66 67 67 for pending in state.drain(..) { 68 - let done = { 69 - let lock = pending.result.lock().unwrap(); 70 - lock.is_some() 71 - }; 72 - if done { 73 - let result = pending.result.lock().unwrap().take().unwrap(); 68 + let taken = pending.result.lock().unwrap().take(); 69 + if let Some(result) = taken { 74 70 completed.push(CompletedFetch { 75 71 promise: pending.promise, 76 72 result,