diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-01-27 11:35:11 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-01-27 11:35:11 +0300 |
commit | ba0391577b06446307fa073f856f57748557e0dd (patch) | |
tree | b2b871a041edee242662c95197bed292531c3a9a /src/nxt_poll.c | |
parent | 6886b83c1f3bfdc514d58ad6e9ab40873cafcb54 (diff) | |
download | unit-ba0391577b06446307fa073f856f57748557e0dd.tar.gz unit-ba0391577b06446307fa073f856f57748557e0dd.tar.bz2 |
Work queues refactoring.
Diffstat (limited to 'src/nxt_poll.c')
-rw-r--r-- | src/nxt_poll.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/nxt_poll.c b/src/nxt_poll.c index 2cc0200b..6f6299b0 100644 --- a/src/nxt_poll.c +++ b/src/nxt_poll.c @@ -397,8 +397,8 @@ nxt_poll_commit_changes(nxt_thread_t *thr, nxt_poll_event_set_t *ps) break; } - nxt_thread_work_queue_add(thr, &thr->work_queue.main, - ev->error_handler, ev->task, ev, ev->data); + nxt_work_queue_add(&thr->engine->fast_work_queue, ev->error_handler, + ev->task, ev, ev->data); ret = NXT_ERROR; @@ -608,10 +608,9 @@ nxt_poll_set_poll(nxt_task_t *task, nxt_event_set_t *event_set, /* Mark the poll entry to ignore it by the kernel. */ pfd->fd = -1; - nxt_thread_work_queue_add(task->thread, - &task->thread->work_queue.main, - ev->error_handler, - ev->task, ev, ev->data); + nxt_work_queue_add(&ev->task->thread->engine->fast_work_queue, + ev->error_handler, + ev->task, ev, ev->data); goto next; } @@ -653,8 +652,8 @@ nxt_poll_set_poll(nxt_task_t *task, nxt_event_set_t *event_set, nxt_poll_change(event_set, ev, NXT_POLL_DELETE, 0); } - nxt_thread_work_queue_add(task->thread, ev->read_work_queue, - ev->read_handler, ev->task, ev, ev->data); + nxt_work_queue_add(ev->read_work_queue, ev->read_handler, + ev->task, ev, ev->data); } if ((events & POLLOUT) || (error && ev->write_handler != NULL)) { @@ -665,9 +664,8 @@ nxt_poll_set_poll(nxt_task_t *task, nxt_event_set_t *event_set, nxt_poll_change(event_set, ev, NXT_POLL_DELETE, 0); } - nxt_thread_work_queue_add(task->thread, ev->write_work_queue, - ev->write_handler, - ev->task, ev, ev->data); + nxt_work_queue_add(ev->write_work_queue, ev->write_handler, + ev->task, ev, ev->data); } next: |