mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-18 10:41:15 +10:00
feat(downloads): lockless tracking of downloaded chunks
This commit is contained in:
@ -73,8 +73,8 @@ impl StoredManifest {
|
||||
Err(e) => error!("{}", e),
|
||||
};
|
||||
}
|
||||
pub fn set_completed_contexts(&self, completed_contexts: &Mutex<Vec<usize>>) {
|
||||
*self.completed_contexts.lock().unwrap() = completed_contexts.lock().unwrap().clone();
|
||||
pub fn set_completed_contexts(&self, completed_contexts: &Vec<usize>) {
|
||||
*self.completed_contexts.lock().unwrap() = completed_contexts.clone();
|
||||
}
|
||||
pub fn get_completed_contexts(&self) -> Vec<usize> {
|
||||
self.completed_contexts.lock().unwrap().clone()
|
||||
|
||||
Reference in New Issue
Block a user