scheduler: enforce job limits in score-based scheduling

This commit is contained in:
David Anderson 2013-05-21 20:14:39 -07:00
parent 1a6a7128a1
commit fa43e0fe6e
1 changed files with 6 additions and 1 deletions

View File

@ -179,7 +179,12 @@ void send_work_score_type(int rt) {
bool sema_locked = false;
for (unsigned int i=0; i<jobs.size(); i++) {
if (!g_wreq->need_proc_type(rt)) break;
if (!work_needed(false)) {
break;
}
if (!g_wreq->need_proc_type(rt)) {
break;
}
JOB& job = jobs[i];
if (!sema_locked) {
lock_sema();