diff options
Diffstat (limited to 'src/select.cpp')
-rw-r--r-- | src/select.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/select.cpp b/src/select.cpp index 68ec9a0..f10acdc 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -51,6 +51,14 @@ zmq::select_t::select_t () : FD_ZERO (&source_set_err); } +zmq::select_t::~select_t () +{ + // Make sure there are no fds registered on shutdown. + zmq_assert (load.get () == 0); + + worker.stop (); +} + zmq::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_) { // Store the file descriptor. @@ -156,11 +164,6 @@ void zmq::select_t::stop () stopping = true; } -void zmq::select_t::join () -{ - worker.stop (); -} - void zmq::select_t::loop () { while (!stopping) { |