mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Don't wake up /sleep threads in think() anymore
When entering and exiting from think() we don't need any special wake up / sleeping code because we want available threads to keep sleeping. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
c59efc53c9
commit
141caf1d5b
1 changed files with 0 additions and 7 deletions
|
@ -464,10 +464,6 @@ bool think(const Position& pos, bool infinite, bool ponder, int time[], int incr
|
||||||
init_eval(ThreadsMgr.active_threads());
|
init_eval(ThreadsMgr.active_threads());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wake up needed threads
|
|
||||||
for (int i = 1; i < newActiveThreads; i++)
|
|
||||||
ThreadsMgr.wake_sleeping_thread(i);
|
|
||||||
|
|
||||||
// Set thinking time
|
// Set thinking time
|
||||||
int myTime = time[pos.side_to_move()];
|
int myTime = time[pos.side_to_move()];
|
||||||
int myIncrement = increment[pos.side_to_move()];
|
int myIncrement = increment[pos.side_to_move()];
|
||||||
|
@ -500,9 +496,6 @@ bool think(const Position& pos, bool infinite, bool ponder, int time[], int incr
|
||||||
if (UseLogFile)
|
if (UseLogFile)
|
||||||
LogFile.close();
|
LogFile.close();
|
||||||
|
|
||||||
// This makes all the threads to go to sleep
|
|
||||||
ThreadsMgr.set_active_threads(1);
|
|
||||||
|
|
||||||
return !Quit;
|
return !Quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue