We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on #4175 (comment) we should improve how we are loading store specs.
For now, we're creating or loading stores on the fly, like a cache:
fn get_store<S: Spec + DeserializeOwned>(&self) -> Result<Arc<SpecStore>> { let key = S::LABEL; let read = self.stores.read(); Ok(match read.get(key) { Some(store) => store.clone(), None => { drop(read); let mut write = self.stores.write(); let store = Arc::new(SpecStore::load::<S, _>(self.path.join(key))?); write.insert(key, store.clone()); drop(write); store } }) }
@sehz said that a better approach would be to load all the specs first and remove this write lock from the get_store.
get_store
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Based on #4175 (comment) we should improve how we are loading store specs.
For now, we're creating or loading stores on the fly, like a cache:
@sehz said that a better approach would be to load all the specs first and remove this write lock from the
get_store
.The text was updated successfully, but these errors were encountered: