Use CRITICAL job priority class for long running dispatcher jobs
This commit is contained in:
@@ -392,8 +392,8 @@ pkcs11_manager_t *pkcs11_manager_create(pkcs11_manager_token_event_t cb,
|
||||
while (enumerator->enumerate(enumerator, &entry))
|
||||
{
|
||||
query_slots(entry);
|
||||
entry->job = callback_job_create((void*)dispatch_slot_events,
|
||||
entry, (void*)end_dispatch, NULL);
|
||||
entry->job = callback_job_create_with_prio((void*)dispatch_slot_events,
|
||||
entry, (void*)end_dispatch, NULL, JOB_PRIO_CRITICAL);
|
||||
lib->processor->queue_job(lib->processor, (job_t*)entry->job);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
@@ -341,7 +341,8 @@ scheduler_t * scheduler_create()
|
||||
|
||||
this->heap = (event_t**)calloc(this->heap_size + 1, sizeof(event_t*));
|
||||
|
||||
this->job = callback_job_create((callback_job_cb_t)schedule, this, NULL, NULL);
|
||||
this->job = callback_job_create_with_prio((callback_job_cb_t)schedule,
|
||||
this, NULL, NULL, JOB_PRIO_CRITICAL);
|
||||
lib->processor->queue_job(lib->processor, (job_t*)this->job);
|
||||
|
||||
return &this->public;
|
||||
|
||||
Reference in New Issue
Block a user