diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index d1e4562..122ce60 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,7 +116,11 @@ fn main() -> Result<()> { if args.get_flag("doit") { let hanlder = running.clone(); let threads = *args.get_one::<usize>("threads").unwrap(); - files::reencode_files(conn, hanlder, threads)?; + let pool = rayon::ThreadPoolBuilder::new() + .num_threads(threads) + .build()?; + + pool.install(|| files::reencode_files(conn, hanlder))?; } Ok::<(), anyhow::Error>(()) } |
