&& !(this_sp && this_sp->slavesMask.none())
&& !searching)
{
- if ( !this_sp
+ if ( !this_sp
&& !Threads.main()->thinking)
{
std::unique_lock<Mutex> lk(mutex);
// If this thread has been assigned work, launch a search
while (searching)
{
- mutex.lock();
+ spinlock.acquire();
assert(activeSplitPoint);
SplitPoint* sp = activeSplitPoint;
- mutex.unlock();
+ spinlock.release();
Stack stack[MAX_PLY+4], *ss = stack+2; // To allow referencing (ss-2) and (ss+2)
Position pos(*sp->pos, this);