watcher: use processors new execute_job() to notify FDs

Just queueing is problematic, as all threads might be busy waiting for events
that the queued (but never executed) job delivers.
This commit is contained in:
Martin Willi
2013-07-18 16:00:31 +02:00
parent 6653e6c13e
commit ea009869e9
+1 -9
View File
@@ -325,15 +325,7 @@ static job_requeue_t watch(private_watcher_t *this)
while (this->jobs->remove_first(this->jobs,
(void**)&job) == SUCCESS)
{
if (lib->processor->get_threads(lib->processor))
{
lib->processor->queue_job(lib->processor, job);
}
else
{
job->execute(job);
job->destroy(job);
}
lib->processor->execute_job(lib->processor, job);
}
/* we temporarily disable a notified FD, rebuild FDSET */
return JOB_REQUEUE_DIRECT;