summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_event_conn_job_sendfile.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-01-27 11:35:11 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-01-27 11:35:11 +0300
commitba0391577b06446307fa073f856f57748557e0dd (patch)
treeb2b871a041edee242662c95197bed292531c3a9a /src/nxt_event_conn_job_sendfile.c
parent6886b83c1f3bfdc514d58ad6e9ab40873cafcb54 (diff)
downloadunit-ba0391577b06446307fa073f856f57748557e0dd.tar.gz
unit-ba0391577b06446307fa073f856f57748557e0dd.tar.bz2
Work queues refactoring.
Diffstat (limited to 'src/nxt_event_conn_job_sendfile.c')
-rw-r--r--src/nxt_event_conn_job_sendfile.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nxt_event_conn_job_sendfile.c b/src/nxt_event_conn_job_sendfile.c
index 86a05969..e9334016 100644
--- a/src/nxt_event_conn_job_sendfile.c
+++ b/src/nxt_event_conn_job_sendfile.c
@@ -157,9 +157,10 @@ done:
fast:
- nxt_thread_pool_post(task->thread->thread_pool,
- nxt_event_conn_job_sendfile_handler,
- &jbs->job.task, jbs, c);
+ nxt_work_set(&jbs->job.work, nxt_event_conn_job_sendfile_handler,
+ jbs->job.task, jbs, c);
+
+ nxt_thread_pool_post(task->thread->thread_pool, &jbs->job.work);
}
@@ -257,8 +258,8 @@ nxt_event_conn_job_sendfile_completion(nxt_task_t *task, nxt_event_conn_t *c,
break;
}
- nxt_thread_work_queue_add(task->thread, c->write_work_queue,
- b->completion_handler, task, b, b->parent);
+ nxt_work_queue_add(c->write_work_queue,
+ b->completion_handler, task, b, b->parent);
b = b->next;
}