summaryrefslogtreecommitdiff
path: root/src/select.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-26 19:22:33 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-26 19:22:33 +0200
commit8d7bf6684cbb9625ec7c963b8867e2411b49eb57 (patch)
tree934d18199f7ba555235feff84df310a99b075a6c /src/select.cpp
parentcf815e8c785254d97190f223765fbbd19a1e6d52 (diff)
common base for all pollers created; the only thing it handles at the moment is 'load'
Diffstat (limited to 'src/select.cpp')
-rw-r--r--src/select.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/select.cpp b/src/select.cpp
index f169239..a04ee66 100644
--- a/src/select.cpp
+++ b/src/select.cpp
@@ -54,9 +54,6 @@ zmq::select_t::select_t () :
zmq::select_t::~select_t ()
{
worker.stop ();
-
- // Make sure there are no fds registered on shutdown.
- zmq_assert (load.get () == 0);
}
zmq::select_t::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_)
@@ -77,7 +74,7 @@ zmq::select_t::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_)
maxfd = fd_;
// Increase the load metric of the thread.
- load.add (1);
+ adjust_load (1);
return fd_;
}
@@ -113,7 +110,7 @@ void zmq::select_t::rm_fd (handle_t handle_)
}
// Decrease the load metric of the thread.
- load.sub (1);
+ adjust_load (-1);
}
void zmq::select_t::set_pollin (handle_t handle_)
@@ -148,11 +145,6 @@ void zmq::select_t::cancel_timer (i_poll_events *events_, int id_)
timers.erase (it);
}
-int zmq::select_t::get_load ()
-{
- return load.get ();
-}
-
void zmq::select_t::start ()
{
worker.start (worker_routine, this);