mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Retire Thread::TERMINATED
Use proper way to detect for thread terimnation instead of our homegrown flag. It adds more code than it removes and adds also platform specific code, neverthless I think is the way to go becuase Thread::TERMINATED flag is intrinsecly racy given that when we raise it thread is still _not_ terminated nor it can be, and also we don't want to reinvent the (broken) wheel of thread termination detection when there is already available the proper one. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -2168,7 +2168,6 @@ void Thread::idle_loop(SplitPoint* sp) {
|
||||
if (do_terminate)
|
||||
{
|
||||
assert(!sp);
|
||||
state = Thread::TERMINATED;
|
||||
lock_release(&sleepLock);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user