summaryrefslogtreecommitdiff
path: root/src/poll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/poll.cpp')
-rw-r--r--src/poll.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/poll.cpp b/src/poll.cpp
index 864cfad..94e4fd4 100644
--- a/src/poll.cpp
+++ b/src/poll.cpp
@@ -50,6 +50,14 @@ zmq::poll_t::poll_t () :
fd_table [i].index = retired_fd;
}
+zmq::poll_t::~poll_t ()
+{
+ // Make sure there are no fds registered on shutdown.
+ zmq_assert (load.get () == 0);
+
+ worker.stop ();
+}
+
zmq::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
{
pollfd pfd = {fd_, 0, 0};
@@ -132,11 +140,6 @@ void zmq::poll_t::stop ()
stopping = true;
}
-void zmq::poll_t::join ()
-{
- worker.stop ();
-}
-
void zmq::poll_t::loop ()
{
while (!stopping) {