mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Acquire reporter lock once (#11278)
See https://github.com/astral-sh/uv/pull/11165#discussion_r1943853482
This commit is contained in:
parent
5ce48cf799
commit
cfd1e670dd
1 changed files with 3 additions and 3 deletions
|
@ -225,9 +225,9 @@ impl ProgressReporter {
|
|||
return;
|
||||
};
|
||||
|
||||
let progress = state.lock().unwrap().bars.remove(&id).unwrap();
|
||||
|
||||
let size = state.lock().unwrap().download_size[&id];
|
||||
let mut state = state.lock().unwrap();
|
||||
let progress = state.bars.remove(&id).unwrap();
|
||||
let size = state.download_size[&id];
|
||||
if multi_progress.is_hidden()
|
||||
&& !*HAS_UV_TEST_NO_CLI_PROGRESS
|
||||
&& size.is_none_or(|size| size > 1024 * 1024)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue