From 24cf53ad6eaa0eb9a873b909e932d95417f52d2c Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 16 Feb 2012 10:09:58 +0900 Subject: io_thread_t merged with poller_base_t The relationship of these two classes was 1:1. Thus one of them was obsolete. Signed-off-by: Martin Sustrik --- src/ctx.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ctx.cpp') diff --git a/src/ctx.cpp b/src/ctx.cpp index a8df950..8b27b31 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -31,7 +31,6 @@ #include "ctx.hpp" #include "socket_base.hpp" -#include "io_thread.hpp" #include "monitor.hpp" #include "reaper.hpp" #include "pipe.hpp" @@ -198,8 +197,8 @@ xs::socket_base_t *xs::ctx_t::create_socket (int type_) // Create I/O thread objects and launch them. for (uint32_t i = 2; i != io_thread_count + 2; i++) { - io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, i); - alloc_assert (io_thread); + poller_base_t *io_thread = poller_base_t::create (this, i); + errno_assert (io_thread); io_threads.push_back (io_thread); slots [i] = io_thread->get_mailbox (); io_thread->start (); @@ -227,7 +226,7 @@ xs::socket_base_t *xs::ctx_t::create_socket (int type_) #endif // Create the monitor object. - io_thread_t *io_thread = choose_io_thread (0); + poller_base_t *io_thread = choose_io_thread (0); xs_assert (io_thread); monitor = new (std::nothrow) monitor_t (io_thread); alloc_assert (monitor); @@ -302,7 +301,7 @@ void xs::ctx_t::send_command (uint32_t tid_, const command_t &command_) slots [tid_]->send (command_); } -xs::io_thread_t *xs::ctx_t::choose_io_thread (uint64_t affinity_) +xs::poller_base_t *xs::ctx_t::choose_io_thread (uint64_t affinity_) { if (io_threads.empty ()) return NULL; -- cgit v1.2.3