(svn r26276) -Fix [FS#5874]: Don't spawn link graph jobs for link graphs with only one node

This commit is contained in:
fonsinchen 2014-01-24 21:39:07 +00:00
parent 932dad7c8b
commit 95354136be
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,12 @@ void LinkGraphSchedule::SpawnNext()
{
if (this->schedule.empty()) return;
LinkGraph *next = this->schedule.front();
LinkGraph *first = next;
while (next->Size() < 2) {
this->schedule.splice(this->schedule.end(), this->schedule, this->schedule.begin());
next = this->schedule.front();
if (next == first) return;
}
assert(next == LinkGraph::Get(next->index));
this->schedule.pop_front();
if (LinkGraphJob::CanAllocateItem()) {