mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Remove unnecessary uses of DashMap
and Arc
(#3413)
## Summary All of the resolver code is run on the main thread, so a lot of the `Send` bounds and uses of `DashMap` and `Arc` are unnecessary. We could also switch to using single-threaded versions of `Mutex` and `Notify` in some places, but there isn't really a crate that provides those I would be comfortable with using. The `Arc` in `OnceMap` can't easily be removed because of the uv-auth code which uses the [reqwest-middleware](https://docs.rs/reqwest-middleware/latest/reqwest_middleware/trait.Middleware.html) crate, that seems to adds unnecessary `Send` bounds because of `async-trait`. We could duplicate the code and create a `OnceMapLocal` variant, but I don't feel that's worth it.
This commit is contained in:
parent
2c84af15b8
commit
94cf604574
18 changed files with 165 additions and 145 deletions
|
@ -314,7 +314,7 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
build_kind,
|
||||
self.build_extra_env_vars.clone(),
|
||||
)
|
||||
.boxed()
|
||||
.boxed_local()
|
||||
.await?;
|
||||
Ok(builder)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue