diff options
| author | Mike White <botahamec@outlook.com> | 2021-09-18 12:25:15 -0400 |
|---|---|---|
| committer | Mike White <botahamec@outlook.com> | 2021-09-18 12:25:15 -0400 |
| commit | f1d3cf99a122c63e09f33ca30d6c09fd29d66a24 (patch) | |
| tree | c8371c1a8ecd3851b00081bb9ae0cd6d81c4b313 /model | |
| parent | 022ad804720a9cede6e8e463ad4bf82db3588f84 (diff) | |
Implement multithreading
Diffstat (limited to 'model')
| -rw-r--r-- | model/Cargo.toml | 1 | ||||
| -rw-r--r-- | model/src/possible_moves.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/model/Cargo.toml b/model/Cargo.toml index f264a17..cdda386 100644 --- a/model/Cargo.toml +++ b/model/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] serde = { version = "1.0.126", optional = true, features = ["derive"] } +rayon = "1" [dev-dependencies] proptest = "1.0.0" diff --git a/model/src/possible_moves.rs b/model/src/possible_moves.rs index 98a25e2..7d32a27 100644 --- a/model/src/possible_moves.rs +++ b/model/src/possible_moves.rs @@ -1,5 +1,6 @@ use crate::moves::{Move, MoveDirection}; use crate::{CheckersBitBoard, PieceColor}; + use std::alloc::{alloc, dealloc, handle_alloc_error, Layout}; use std::mem::MaybeUninit; use std::ptr::NonNull; @@ -94,6 +95,8 @@ impl PossibleMovesIter { } } +unsafe impl Send for PossibleMovesIter {} + impl Iterator for PossibleMovesIter { type Item = Move; |
