summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/files.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/files.rs b/src/files.rs
index 8db0f64..8181d1b 100644
--- a/src/files.rs
+++ b/src/files.rs
@@ -186,8 +186,10 @@ pub fn reencode_files(conn: Connection, handler: Arc<AtomicBool>, threads: usize
});
}
- while *thread_counter.read().unwrap() != 0 {
- sleep(time::Duration::from_millis(100));
+ loop {
+ if *thread_counter.read().unwrap() == 0 {
+ break;
+ }
}
#[cfg(not(test))]