mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +00: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:
+2
-2
@@ -50,7 +50,7 @@ namespace Search {
|
||||
volatile SignalsType Signals;
|
||||
LimitsType Limits;
|
||||
std::vector<Move> RootMoves;
|
||||
Position* RootPosition;
|
||||
Position RootPosition;
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -362,7 +362,7 @@ void Search::think() {
|
||||
|
||||
static Book book; // Defined static to initialize the PRNG only once
|
||||
|
||||
Position& pos = *RootPosition;
|
||||
Position& pos = RootPosition;
|
||||
|
||||
// Save "search start" time and reset elapsed time to zero
|
||||
elapsed_search_time(get_system_time());
|
||||
|
||||
Reference in New Issue
Block a user