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_select.c | |
parent | 6886b83c1f3bfdc514d58ad6e9ab40873cafcb54 (diff) | |
download | unit-ba0391577b06446307fa073f856f57748557e0dd.tar.gz unit-ba0391577b06446307fa073f856f57748557e0dd.tar.bz2 |
Work queues refactoring.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_select.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/nxt_select.c b/src/nxt_select.c index a2982d2f..8ee5808e 100644 --- a/src/nxt_select.c +++ b/src/nxt_select.c @@ -141,9 +141,8 @@ nxt_select_enable_read(nxt_event_set_t *event_set, nxt_event_fd_t *ev) if (fd < 0 || fd >= (nxt_fd_t) FD_SETSIZE) { thr = nxt_thread(); - nxt_thread_work_queue_add(thr, &thr->work_queue.main, - nxt_select_error_handler, - ev->task, ev, ev->data); + nxt_work_queue_add(&thr->engine->fast_work_queue, + nxt_select_error_handler, ev->task, ev, ev->data); return; } @@ -174,9 +173,8 @@ nxt_select_enable_write(nxt_event_set_t *event_set, nxt_event_fd_t *ev) if (fd < 0 || fd >= (nxt_fd_t) FD_SETSIZE) { thr = nxt_thread(); - nxt_thread_work_queue_add(thr, &thr->work_queue.main, - nxt_select_error_handler, - ev->task, ev, ev->data); + nxt_work_queue_add(&thr->engine->fast_work_queue, + nxt_select_error_handler, ev->task, ev, ev->data); return; } @@ -365,8 +363,8 @@ nxt_select_poll(nxt_task_t *task, nxt_event_set_t *event_set, nxt_select_disable_read(event_set, ev); } - 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); found = 1; } @@ -382,9 +380,8 @@ nxt_select_poll(nxt_task_t *task, nxt_event_set_t *event_set, nxt_select_disable_write(event_set, ev); } - 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); found = 1; } |