From 6ba1d3ead63490f1f6734bd0245ed10783975c11 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 8 May 2014 09:09:35 +0200 Subject: [PATCH] Clarify some comments in SMP code Spotted by Joona. No functional change. --- src/search.cpp | 3 +-- src/thread.cpp | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 1d40f8a0..74851fb2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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 diff --git a/src/thread.cpp b/src/thread.cpp index 0ebf82f9..06244dc9 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -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() { -- 2.39.2