Spinlock must be used instead.
Tested for no regression at 15+0.05 th 4:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 25928 W: 4303 L: 4190 D: 17435
No functional change.
Resolves #297
&& !(this_sp && this_sp->slavesMask.none())
&& !searching)
{
&& !(this_sp && this_sp->slavesMask.none())
&& !searching)
{
&& !Threads.main()->thinking)
{
std::unique_lock<Mutex> lk(mutex);
&& !Threads.main()->thinking)
{
std::unique_lock<Mutex> lk(mutex);
// If this thread has been assigned work, launch a search
while (searching)
{
// If this thread has been assigned work, launch a search
while (searching)
{
assert(activeSplitPoint);
SplitPoint* sp = activeSplitPoint;
assert(activeSplitPoint);
SplitPoint* sp = activeSplitPoint;
Stack stack[MAX_PLY+4], *ss = stack+2; // To allow referencing (ss-2) and (ss+2)
Position pos(*sp->pos, this);
Stack stack[MAX_PLY+4], *ss = stack+2; // To allow referencing (ss-2) and (ss+2)
Position pos(*sp->pos, this);