-// sleep() is called after the search finishes to ask all the threads but the
-// main one to go waiting on a sleep condition.
-
-void ThreadPool::sleep() const {
-
- // Main thread will go to sleep by itself to avoid a race with start_searching()
- for (size_t i = 1; i < threads.size(); i++)
- threads[i]->do_sleep = true;
-}
-
-
-// available_slave_exists() tries to find an idle thread which is available as
-// a slave for the thread 'master'.
-
-bool ThreadPool::available_slave_exists(Thread* master) const {
-
- for (size_t i = 0; i < threads.size(); i++)
- if (threads[i]->is_available_to(master))
- return true;
-
- return false;
-}
+// slave_available() tries to find an idle thread which is available as a slave
+// for the thread 'master'.