]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Simplify finished search in ponder/infinite mode.
[stockfish] / src / thread.cpp
index 6d3364d5c56525c1bdad9fc8af803ce8ed2234e2..c602e0b46a873a60ae6a02d117d8d70347206829 100644 (file)
@@ -68,24 +68,12 @@ void Thread::wait_for_search_finished() {
 }
 
 
-/// Thread::wait() waits on sleep condition until condition is true
-
-void Thread::wait(std::atomic_bool& condition) {
-
-  std::unique_lock<Mutex> lk(mutex);
-  sleepCondition.wait(lk, [&]{ return bool(condition); });
-}
-
-
 /// Thread::start_searching() wakes up the thread that will start the search
 
-void Thread::start_searching(bool resume) {
+void Thread::start_searching() {
 
   std::unique_lock<Mutex> lk(mutex);
-
-  if (!resume)
-      searching = true;
-
+  searching = true;
   sleepCondition.notify_one();
 }