summaryrefslogtreecommitdiff
path: root/src/ctx.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:09:58 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:09:58 +0900
commit24cf53ad6eaa0eb9a873b909e932d95417f52d2c (patch)
tree0d2f19a76536d09d0fe6e22874ce572eda70eccd /src/ctx.cpp
parent0641ffa5e9588dd7daaf389c40a213994fe4b1b1 (diff)
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 <sustrik@250bpm.com>
Diffstat (limited to 'src/ctx.cpp')
-rw-r--r--src/ctx.cpp9
1 files changed, 4 insertions, 5 deletions
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;