aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grossmeister/UCI.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/grossmeister/UCI.rs b/src/grossmeister/UCI.rs
index e88d970..1997221 100644
--- a/src/grossmeister/UCI.rs
+++ b/src/grossmeister/UCI.rs
@@ -172,6 +172,9 @@ impl Grossmeister {
fn create_search_thread(&self, depth: u8, duration: Duration) -> JoinHandle<Self> {
let ordering = std::sync::atomic::Ordering::Relaxed;
let should_halt = self.should_halt.clone();
+ // Make sure we don't halt right away
+ should_halt.store(false, std::sync::atomic::Ordering::Relaxed);
+
let should_terminate = Arc::new(AtomicBool::new(true));
if duration < Duration::MAX {