node failure now detected and recovered from in distrib::getTask()
git-svn-id: svn://anubis/fart/trunk@240 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
aaa38f6f2c
commit
f267a8fd86
@ -374,6 +374,16 @@ int distrib::getTask()
|
||||
m_next_task++;
|
||||
}
|
||||
pthread_mutex_unlock(&m_task_mutex);
|
||||
if (task == -1)
|
||||
{
|
||||
pthread_mutex_lock(&m_tasks_in_progress_mutex);
|
||||
std::map<int, int>::const_iterator it = m_tasks_in_progress.begin();
|
||||
if (it != m_tasks_in_progress.end())
|
||||
{
|
||||
task = it->first;
|
||||
}
|
||||
pthread_mutex_unlock(&m_tasks_in_progress_mutex);
|
||||
}
|
||||
if (task > -1)
|
||||
startTask(task);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user