mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Detach search arguments from UI thread
Detach from the UI thread the input arguments used by the search threads so that the UI thread is able to receive and process any command sent by the GUI while other threads keep searching. With this patch there is no more need to block the UI thread after a "stop", so it is a more reliable and robust solution than the previous patch. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -84,16 +84,17 @@ struct StateInfo {
|
||||
|
||||
class Position {
|
||||
|
||||
// No defaul, copy c'tor or assignment allowed, default c'tor will not be
|
||||
// generated anyhow because of user-defined c'tors.
|
||||
// No copy c'tor or assignment operator allowed
|
||||
Position(const Position&);
|
||||
Position& operator=(const Position&);
|
||||
|
||||
public:
|
||||
Position(const Position& pos, int threadID);
|
||||
Position(const std::string& fen, bool isChess960, int threadID);
|
||||
Position() {}
|
||||
Position(const Position& pos, int th) { copy(pos, th); }
|
||||
Position(const std::string& fen, bool isChess960, int th);
|
||||
|
||||
// Text input/output
|
||||
void copy(const Position& pos, int th);
|
||||
void from_fen(const std::string& fen, bool isChess960);
|
||||
const std::string to_fen() const;
|
||||
void print(Move m = MOVE_NONE) const;
|
||||
|
||||
Reference in New Issue
Block a user