Skip to content

Commit

Permalink
fix multithreading bug
Browse files Browse the repository at this point in the history
Bench: 5011790
  • Loading branch information
Adam-Kulju authored Jan 22, 2025
1 parent bf65524 commit d99c110
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/src/search.h
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,9 @@ void iterative_deepen(
finish:
// wait for all threads to finish searching
// printf("%i\n", thread_info.thread_id);
thread_data.stop = true;
if (thread_info.thread_id == 0){
thread_data.stop = true;
}
search_end_barrier.arrive_and_wait();
if (thread_info.thread_id == 0 && !thread_info.doing_datagen &&
!thread_info.is_human) {
Expand Down

0 comments on commit d99c110

Please sign in to comment.