summaryrefslogtreecommitdiff
path: root/src/io_thread.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:04:42 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:04:42 +0900
commit7e4fa8505f479c494b9e7bab361e4a11e1c579a5 (patch)
tree90016499b28b113b35b15eb6656b739c1389336b /src/io_thread.cpp
parentd3752a38faa25f2f213c638e4c236533eff72b70 (diff)
poller_base_t is used instead of poller_t
Poller object is virtualised. You can access poller via its base class (poller_base_t) instead of using poller_t which was a typedef pointing to actual derived class. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/io_thread.cpp')
-rw-r--r--src/io_thread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/io_thread.cpp b/src/io_thread.cpp
index 75bca4f..c1f5849 100644
--- a/src/io_thread.cpp
+++ b/src/io_thread.cpp
@@ -29,8 +29,8 @@
xs::io_thread_t::io_thread_t (ctx_t *ctx_, uint32_t tid_) :
object_t (ctx_, tid_)
{
- poller = new (std::nothrow) poller_t;
- alloc_assert (poller);
+ poller = poller_base_t::create ();
+ xs_assert (poller);
mailbox_handle = poller->add_fd (mailbox.get_fd (), this);
poller->set_pollin (mailbox_handle);
@@ -95,7 +95,7 @@ void xs::io_thread_t::timer_event (int id_)
xs_assert (false);
}
-xs::poller_t *xs::io_thread_t::get_poller ()
+xs::poller_base_t *xs::io_thread_t::get_poller ()
{
xs_assert (poller);
return poller;