use channels in pm3 function

This commit is contained in:
2025-04-16 15:31:23 +02:00
parent a9bbc61300
commit 9a26dad304
2 changed files with 40 additions and 8 deletions

View File

@@ -1,9 +1,18 @@
use pm3::run_pm3;
use pm3::{pm3_mock, run_pm3};
use std::{sync::mpsc::channel, thread};
mod id_store;
mod parser;
mod pm3;
mod id_store;
fn main() {
run_pm3().unwrap();
let (sender, receiver) = channel();
thread::spawn(move || {
// run_pm3(sender);
pm3_mock(sender);
});
while true {
println!("{}", receiver.recv().unwrap());
}
}