From 546dc75d026bef114da8fdae1003acb468f6f7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 27 Oct 2024 19:24:02 +0100 Subject: [PATCH] Add a naive single thread algorithm --- src/algorithm.rs | 3 +++ src/algorithm/single_thread.rs | 7 +++++++ src/lib.rs | 1 + 3 files changed, 11 insertions(+) create mode 100644 src/algorithm.rs create mode 100644 src/algorithm/single_thread.rs diff --git a/src/algorithm.rs b/src/algorithm.rs new file mode 100644 index 0000000..0ebf2b7 --- /dev/null +++ b/src/algorithm.rs @@ -0,0 +1,3 @@ +mod single_thread; + +pub use single_thread::single_thread; diff --git a/src/algorithm/single_thread.rs b/src/algorithm/single_thread.rs new file mode 100644 index 0000000..1bdbe81 --- /dev/null +++ b/src/algorithm/single_thread.rs @@ -0,0 +1,7 @@ +use crate::Task; + +pub fn single_thread(data: &[Task]) { + for task in data { + task.execute(); + } +} diff --git a/src/lib.rs b/src/lib.rs index e6e9d82..2b4c413 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +mod algorithm; mod data; use pbkdf2::pbkdf2_hmac;