mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Refactor ThreadsManager::set_size() functionality
Split the data allocation, now done (mostly once) in read_uci_options(), from the wake up and sleeping of the slave threads upon entering/exiting the search. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -298,7 +298,7 @@ void Search::think() {
|
||||
<< endl;
|
||||
}
|
||||
|
||||
Threads.set_size(Options["Threads"]);
|
||||
Threads.wake_up();
|
||||
|
||||
// Set best timer interval to avoid lagging under time pressure. Timer is
|
||||
// used to check for remaining available thinking time.
|
||||
@@ -312,7 +312,7 @@ void Search::think() {
|
||||
|
||||
// Stop timer and send all the slaves to sleep, if not already sleeping
|
||||
Threads.set_timer(0);
|
||||
Threads.set_size(1);
|
||||
Threads.sleep();
|
||||
|
||||
if (Options["Use Search Log"])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user