Move stop signal to Threads

Instead of having Signals in the search namespace,
make the stop variables part of the Threads structure.
This moves more of the shared (atomic) variables towards
the thread-related structures, making their role more clear.

No functional change

Closes #1149
This commit is contained in:
Joost VandeVondele
2017-07-13 16:07:19 -07:00
committed by Joona Kiiski
parent 0371a8f8c4
commit 36a93d90f7
5 changed files with 26 additions and 35 deletions
-10
View File
@@ -21,7 +21,6 @@
#ifndef SEARCH_H_INCLUDED
#define SEARCH_H_INCLUDED
#include <atomic>
#include <vector>
#include "misc.h"
@@ -92,15 +91,6 @@ struct LimitsType {
TimePoint startTime;
};
/// SignalsType struct stores atomic flags updated during the search, typically
/// in an async fashion e.g. to stop the search by the GUI.
struct SignalsType {
std::atomic_bool stop, stopOnPonderhit;
};
extern SignalsType Signals;
extern LimitsType Limits;
void init();