]> git.sesse.net Git - stockfish/commitdiff
Clarify some comments in SMP code
authorMarco Costalba <mcostalba@gmail.com>
Thu, 8 May 2014 07:09:35 +0000 (09:09 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 8 May 2014 07:09:35 +0000 (09:09 +0200)
Spotted by Joona.

No functional change.

src/search.cpp
src/thread.cpp

index 1d40f8a070bfbe9f64ccd85355985aa54a769916..74851fb2058e7354da21f5ab0806404268e4878d 100644 (file)
@@ -1547,8 +1547,7 @@ void Thread::idle_loop() {
 
           // After releasing the lock we can't access any SplitPoint related data
           // in a safe way because it could have been released under our feet by
-          // the sp master. Also accessing other Thread objects is unsafe because
-          // if we are exiting there is a chance that they are already freed.
+          // the sp master.
           sp->mutex.unlock();
 
           // Try to late join to another split point if none of its slaves has
index 0ebf82f92daf8b46dbfc45a6c0fce363ef4c6808..06244dc9bb957c41f5d47d13ed64aa59a40c6bf8 100644 (file)
@@ -194,7 +194,8 @@ void ThreadPool::init() {
 }
 
 
-// exit() cleanly terminates the threads before the program exits
+// exit() cleanly terminates the threads before the program exits. Cannot be done in
+// d'tor because we have to terminate the threads before to free ThreadPool object.
 
 void ThreadPool::exit() {