From 389edb8099b6981cc0f00b2c157250bb1ec4e272 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 17 Oct 2010 09:03:39 +0100 Subject: [PATCH] Retire put_threads_to_sleep() Obsoleted by previous patches. No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 46dd53eb..6cc13c01 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -83,7 +83,6 @@ namespace { bool thread_is_available(int slave, int master) const; bool thread_should_stop(int threadID) const; void wake_sleeping_thread(int threadID); - void put_threads_to_sleep(); void idle_loop(int threadID, SplitPoint* sp); template @@ -501,7 +500,8 @@ bool think(const Position& pos, bool infinite, bool ponder, int time[], int incr if (UseLogFile) LogFile.close(); - ThreadsMgr.put_threads_to_sleep(); + // This makes all the threads to go to sleep + ThreadsMgr.set_active_threads(1); return !Quit; } @@ -2575,16 +2575,6 @@ split_point_start: // At split points actual search starts from here } - // put_threads_to_sleep() makes all the threads go to sleep just before - // to leave think(), at the end of the search. Threads should have already - // finished the job and should be idle. - - void ThreadsManager::put_threads_to_sleep() { - - // This makes the threads to go to sleep - ActiveThreads = 1; - } - /// The RootMoveList class // RootMoveList c'tor -- 2.39.2