X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fthread.cpp;h=c602e0b46a873a60ae6a02d117d8d70347206829;hb=2783203428300cf0a6305b64691ad38fa340f253;hp=6d3364d5c56525c1bdad9fc8af803ce8ed2234e2;hpb=66c5eaebd8c3ecc00a21a9c7f214cb59db4ce4e5;p=stockfish diff --git a/src/thread.cpp b/src/thread.cpp index 6d3364d5..c602e0b4 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -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 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 lk(mutex); - - if (!resume) - searching = true; - + searching = true; sleepCondition.notify_one(); }