processor: force synchronous execute_job() if set_threads(0) has been called
During daemon shutdown, some idle threads might be lingering around even if set_threads(0) already has been called. To avoid any races, we enforce synchronous execution of the job.
This commit is contained in:
@@ -408,7 +408,7 @@ METHOD(processor_t, execute_job, void,
|
||||
bool queued = FALSE;
|
||||
|
||||
this->mutex->lock(this->mutex);
|
||||
if (get_idle_threads_nolock(this))
|
||||
if (this->desired_threads && get_idle_threads_nolock(this))
|
||||
{
|
||||
prio = sane_prio(job->get_priority(job));
|
||||
job->status = JOB_STATUS_QUEUED;
|
||||
|
||||
Reference in New Issue
Block a user