// Thread c'tor makes some init but does not launch any execution thread that
// will be started only when c'tor returns.
-Thread::Thread() /* : splitPoints() */ { // Value-initialization bug in MSVC
+Thread::Thread() /* : splitPoints() */ { // Initialization of non POD broken in MSVC
searching = false;
maxPly = splitPointsSize = 0;
Thread* slave;
- while ((slave = Threads.available_slave(this)) != NULL)
+ while ( sp.slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT
+ && (slave = Threads.available_slave(this)) != NULL)
{
sp.slavesMask.set(slave->idx);
slave->activeSplitPoint = &sp;