add multithreaded example

This commit is contained in:
b1ek 2023-08-02 21:48:07 +10:00
parent 4e1e14d418
commit 8f631cb6b5
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
use powlib::{gen::{POWRange, POWChallenge}, solver::POWSolver};
fn main() {
let challenge = POWChallenge::make(POWRange::new(0, 20480));
let mut solver = POWSolver::new(challenge);
println!("Found {} with 8 threads", solver.solve_blocking(8, Some(|x| println!("{x}"))));
}