mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Remove useless condition in late join
In case of Threads.size() == 2 we have that sp->allSlavesSearching is always false (because we have finished our search), bestSp is always NULL and we never late join, so there is no need to special case here. Tested with dbg_hit_on(sp && sp->allSlavesSearching) and verified it never fires. No functional change.
This commit is contained in:
parent
dccaa145d2
commit
4f906a2589
1 changed files with 40 additions and 43 deletions
|
@ -1588,8 +1588,6 @@ void Thread::idle_loop() {
|
||||||
|
|
||||||
// Try to late join to another split point if none of its slaves has
|
// Try to late join to another split point if none of its slaves has
|
||||||
// already finished.
|
// already finished.
|
||||||
if (Threads.size() > 2)
|
|
||||||
{
|
|
||||||
SplitPoint* bestSp = NULL;
|
SplitPoint* bestSp = NULL;
|
||||||
int bestThread = 0;
|
int bestThread = 0;
|
||||||
int bestScore = INT_MAX;
|
int bestScore = INT_MAX;
|
||||||
|
@ -1642,7 +1640,6 @@ void Thread::idle_loop() {
|
||||||
Threads.mutex.unlock();
|
Threads.mutex.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Grab the lock to avoid races with Thread::notify_one()
|
// Grab the lock to avoid races with Thread::notify_one()
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
|
|
Loading…
Add table
Reference in a new issue