Skip to content

Commit

Permalink
Save concurrently too because why not
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Mar 23, 2024
1 parent c0bf996 commit f4f7196
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/storage/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ impl Home {
Saves the contents of this `Home` to disk.
*/
pub async fn save(&self) -> StorageResult<()> {
self.trust_cache.save(&self.path).await?;
self.install_cache.save(&self.path).await?;
tokio::try_join!(
self.trust_cache.save(&self.path),
self.install_cache.save(&self.path)
)?;
self.saved.store(true, Ordering::SeqCst);
Ok(())
}
Expand Down

0 comments on commit f4f7196

Please sign in to comment.