]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
remove blank line between function and it's description
[stockfish] / src / thread.cpp
index 9f8a63bdc0175cc2422f3bcd8624711c3d0626ae..fdf89095b5e79239883cd9d41d30a760f0c685c2 100644 (file)
@@ -40,9 +40,8 @@ namespace Stockfish {
 ThreadPool Threads;  // Global object
 
 
-// Thread constructor launches the thread and waits until it goes to sleep
+// Constructor launches the thread and waits until it goes to sleep
 // in idle_loop(). Note that 'searching' and 'exit' should be already set.
-
 Thread::Thread(size_t n) :
     idx(n),
     stdThread(&Thread::idle_loop, this) {
@@ -51,9 +50,8 @@ Thread::Thread(size_t n) :
 }
 
 
-// Thread destructor wakes up the thread in idle_loop() and waits
+// Destructor wakes up the thread in idle_loop() and waits
 // for its termination. Thread should be already waiting.
-
 Thread::~Thread() {
 
     assert(!searching);
@@ -64,8 +62,7 @@ Thread::~Thread() {
 }
 
 
-// Thread::clear() reset histories, usually before a new game
-
+// Reset histories, usually before a new game
 void Thread::clear() {
 
     counterMoves.fill(MOVE_NONE);
@@ -80,8 +77,7 @@ void Thread::clear() {
 }
 
 
-// Thread::start_searching() wakes up the thread that will start the search
-
+// Wakes up the thread that will start the search
 void Thread::start_searching() {
     mutex.lock();
     searching = true;
@@ -90,9 +86,8 @@ void Thread::start_searching() {
 }
 
 
-// Thread::wait_for_search_finished() blocks on the condition variable
+// Blocks on the condition variable
 // until the thread has finished searching.
-
 void Thread::wait_for_search_finished() {
 
     std::unique_lock<std::mutex> lk(mutex);
@@ -100,7 +95,7 @@ void Thread::wait_for_search_finished() {
 }
 
 
-// Thread::idle_loop() is where the thread is parked, blocked on the
+// Thread gets parked here, blocked on the
 // condition variable, when it has no work to do.
 
 void Thread::idle_loop() {
@@ -129,10 +124,9 @@ void Thread::idle_loop() {
     }
 }
 
-// ThreadPool::set() creates/destroys threads to match the requested number.
+// Creates/destroys threads to match the requested number.
 // Created and launched threads will immediately go to sleep in idle_loop.
 // Upon resizing, threads are recreated to allow for binding if necessary.
-
 void ThreadPool::set(size_t requested) {
 
     if (threads.size() > 0)  // destroy any existing thread(s)
@@ -160,8 +154,7 @@ void ThreadPool::set(size_t requested) {
 }
 
 
-// ThreadPool::clear() sets threadPool data to initial values
-
+// Sets threadPool data to initial values
 void ThreadPool::clear() {
 
     for (Thread* th : threads)
@@ -174,9 +167,8 @@ void ThreadPool::clear() {
 }
 
 
-// ThreadPool::start_thinking() wakes up main thread waiting in idle_loop() and
+// Wakes up main thread waiting in idle_loop() and
 // returns immediately. Main thread will wake up other threads and start the search.
-
 void ThreadPool::start_thinking(Position&                 pos,
                                 StateListPtr&             states,
                                 const Search::LimitsType& limits,