mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
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:
committed by
Joona Kiiski
parent
0371a8f8c4
commit
36a93d90f7
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user