diff --git a/pbs-tools/src/task.rs b/pbs-tools/src/task.rs index 9e5d5b8f..a0d755aa 100644 --- a/pbs-tools/src/task.rs +++ b/pbs-tools/src/task.rs @@ -3,7 +3,7 @@ use anyhow::{bail, Error}; /// Worker task abstraction /// /// A worker task is a long running task, which usually logs output into a separate file. -pub trait WorkerTaskContext { +pub trait WorkerTaskContext: Send + Sync { /// Test if there was a request to abort the task. fn abort_requested(&self) -> bool; diff --git a/src/backup/verify.rs b/src/backup/verify.rs index cdc48ed2..17179c13 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -19,7 +19,7 @@ use crate::tools::ParallelHandler; /// A VerifyWorker encapsulates a task worker, datastore and information about which chunks have /// already been verified or detected as corrupt. pub struct VerifyWorker { - worker: Arc, + worker: Arc, datastore: Arc, verified_chunks: Arc>>, corrupt_chunks: Arc>>, @@ -27,7 +27,7 @@ pub struct VerifyWorker { impl VerifyWorker { /// Creates a new VerifyWorker for a given task worker and datastore. - pub fn new(worker: Arc, datastore: Arc) -> Self { + pub fn new(worker: Arc, datastore: Arc) -> Self { Self { worker, datastore,