diff options
| author | Mason Reed <mason@vector35.com> | 2026-02-27 14:10:03 -0800 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-03-24 18:46:48 -0700 |
| commit | 7877f7caa3535a7c477c911ddeafdf5bb14ebc14 (patch) | |
| tree | 06bdfd35c4af82176ff279adbf8d6fac3824c8ba /plugins/warp/src/container.rs | |
| parent | 1e85844d6407db817db25fd43f1dd9756ef0c3ae (diff) | |
[WARP] Demote locking surrounding container function fetching
By demoting the containers lock to read only for fetching we can prevent blocking the main ui thread while waiting for the network requests to finish
Diffstat (limited to 'plugins/warp/src/container.rs')
| -rw-r--r-- | plugins/warp/src/container.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/warp/src/container.rs b/plugins/warp/src/container.rs index b5e92bc7..79c243b3 100644 --- a/plugins/warp/src/container.rs +++ b/plugins/warp/src/container.rs @@ -39,6 +39,8 @@ pub enum ContainerError { SearchFailed(String), #[error("failed to commit source '{0}': {1}")] CommitFailed(SourceId, String), + #[error("container error encountered: {0}")] + Custom(String), } /// Represents the ID for a single container source. @@ -224,6 +226,7 @@ pub trait Container: Send + Sync + Display + Debug { /// to verify the permissions of the source. fn add_source(&mut self, path: SourcePath) -> ContainerResult<SourceId>; + // TODO: Make interior mutable. /// Flush changes made to a source. /// /// Because writing to a source can require file or network operations, we let the container @@ -293,7 +296,7 @@ pub trait Container: Send + Sync + Display + Debug { /// will do nothing. This function is blocking, so assume it will take a few seconds for a container /// that intends to fetch over the network. fn fetch_functions( - &mut self, + &self, _target: &Target, _tags: &[SourceTag], _functions: &[FunctionGUID], |
