]> git.sesse.net Git - stockfish/commitdiff
Revert previous patch
authorMarco Costalba <mcostalba@gmail.com>
Sat, 27 Feb 2010 16:22:19 +0000 (17:22 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 27 Feb 2010 16:24:58 +0000 (17:24 +0100)
It raises an assert under Windows, it is not clear why but it
happens that idle_loop() is called with incorrect threadID and
the assert triggered is:

assert(threadID >= 0 && threadID < MAX_THREADS);

So revert the patch for now, but we should understand why it
fails.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 13f333d9fc5a95511f133ee15f5d0a681e095f16..4fd1c03d0a8830ba5411e991a13481e3336a61e5 100644 (file)
@@ -2768,6 +2768,9 @@ namespace {
             cout << "Failed to create thread number " << i << endl;
             Application::exit_with_failure();
         }
+
+        // Wait until the thread has finished launching and is gone to sleep
+        while (threads[i].state != THREAD_SLEEPING);
     }
   }