perf(lsp): concurrent reads and exclusive writes (#17135)

This commit is contained in:
David Sherret 2022-12-19 20:22:17 -05:00 committed by GitHub
parent 1e0017d8fc
commit 54d40e008a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 202 additions and 163 deletions

View file

@ -52,6 +52,8 @@ pub trait InnerNpmPackageResolver: Send + Sync {
packages: HashSet<NpmPackageReq>,
) -> BoxFuture<'static, Result<(), AnyError>>;
fn cache_packages(&self) -> BoxFuture<'static, Result<(), AnyError>>;
fn ensure_read_permission(&self, path: &Path) -> Result<(), AnyError>;
fn snapshot(&self) -> NpmResolutionSnapshot;