aboutsummaryrefslogtreecommitdiff
path: root/src/grossmeister
diff options
context:
space:
mode:
Diffstat (limited to 'src/grossmeister')
-rw-r--r--src/grossmeister/UCI.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/grossmeister/UCI.rs b/src/grossmeister/UCI.rs
index 6f6556c..0c3c158 100644
--- a/src/grossmeister/UCI.rs
+++ b/src/grossmeister/UCI.rs
@@ -89,8 +89,10 @@ impl Grossmeister {
"go" => {
// Before we go, let's join to the latest search
if let Some(hand) = search_handle.take() {
- let better_self = hand.join().unwrap();
- self.transposition_table = better_self.transposition_table;
+ match hand.join() {
+ Ok(better_self) => self.transposition_table = better_self.transposition_table,
+ Err(err) => println!("info string error {:?}", err),
+ }
}
*search_handle = Some(self.parse_go(tokens, false));
@@ -108,9 +110,11 @@ impl Grossmeister {
// Join to the current pondering search
if let Some(hand) = search_handle.take() {
- let better_self = hand.join().unwrap();
+ match hand.join() {
+ Ok(better_self) => self.transposition_table = better_self.transposition_table,
+ Err(err) => println!("info string error {:?}", err),
+ }
halt_scheduled.store(false, Ordering::SeqCst); // Cancel scheduled halting
- self.transposition_table = better_self.transposition_table;
} else {
panic!("Search thread not found!");
}