summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_chan.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_chan.c
parent6886b83c1f3bfdc514d58ad6e9ab40873cafcb54 (diff)
downloadunit-ba0391577b06446307fa073f856f57748557e0dd.tar.gz
unit-ba0391577b06446307fa073f856f57748557e0dd.tar.bz2
Work queues refactoring.
Diffstat (limited to '')
-rw-r--r--src/nxt_chan.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nxt_chan.c b/src/nxt_chan.c
index baa4b9d4..6832ecdc 100644
--- a/src/nxt_chan.c
+++ b/src/nxt_chan.c
@@ -141,7 +141,7 @@ nxt_chan_write_enable(nxt_task_t *task, nxt_chan_t *chan)
chan->socket.task = &chan->task;
- chan->socket.write_work_queue = &task->thread->work_queue.main;
+ chan->socket.write_work_queue = &task->thread->engine->fast_work_queue;
chan->socket.write_handler = nxt_chan_write_handler;
chan->socket.error_handler = nxt_chan_error_handler;
}
@@ -290,9 +290,8 @@ nxt_chan_write_handler(nxt_task_t *task, void *obj, void *data)
fail:
- nxt_thread_work_queue_add(task->thread, &task->thread->work_queue.main,
- nxt_chan_error_handler, task, &chan->socket,
- NULL);
+ nxt_work_queue_add(&task->thread->engine->fast_work_queue,
+ nxt_chan_error_handler, task, &chan->socket, NULL);
}
@@ -308,7 +307,7 @@ nxt_chan_read_enable(nxt_task_t *task, nxt_chan_t *chan)
chan->socket.task = &chan->task;
- chan->socket.read_work_queue = &task->thread->work_queue.main;
+ chan->socket.read_work_queue = &task->thread->engine->fast_work_queue;
chan->socket.read_handler = nxt_chan_read_handler;
chan->socket.error_handler = nxt_chan_error_handler;
@@ -378,9 +377,8 @@ nxt_chan_read_handler(nxt_task_t *task, void *obj, void *data)
/* n == 0 || n == NXT_ERROR */
- nxt_thread_work_queue_add(task->thread, &task->thread->work_queue.main,
- nxt_chan_error_handler, task,
- &chan->socket, NULL);
+ nxt_work_queue_add(&task->thread->engine->fast_work_queue,
+ nxt_chan_error_handler, task, &chan->socket, NULL);
return;
}
}