Commit 42c63368 authored by Constantin Rack's avatar Constantin Rack Committed by GitHub

Merge pull request #2238 from bluca/revert

Problem: PR #2236 breaks the build
parents 324f1049 e46d91d4
...@@ -92,9 +92,7 @@ void zmq::epoll_t::rm_fd (handle_t handle_) ...@@ -92,9 +92,7 @@ void zmq::epoll_t::rm_fd (handle_t handle_)
int rc = epoll_ctl (epoll_fd, EPOLL_CTL_DEL, pe->fd, &pe->ev); int rc = epoll_ctl (epoll_fd, EPOLL_CTL_DEL, pe->fd, &pe->ev);
errno_assert (rc != -1); errno_assert (rc != -1);
pe->fd = retired_fd; pe->fd = retired_fd;
retired_sync.lock ();
retired.push_back (pe); retired.push_back (pe);
retired_sync.unlock ();
// Decrease the load metric of the thread. // Decrease the load metric of the thread.
adjust_load (-1); adjust_load (-1);
...@@ -182,12 +180,10 @@ void zmq::epoll_t::loop () ...@@ -182,12 +180,10 @@ void zmq::epoll_t::loop ()
} }
// Destroy retired event sources. // Destroy retired event sources.
retired_sync.lock ();
for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) { for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) {
LIBZMQ_DELETE(*it); LIBZMQ_DELETE(*it);
} }
retired.clear (); retired.clear ();
retired_sync.unlock ();
} }
} }
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "fd.hpp" #include "fd.hpp"
#include "thread.hpp" #include "thread.hpp"
#include "poller_base.hpp" #include "poller_base.hpp"
#include "mutex.h"
namespace zmq namespace zmq
{ {
...@@ -103,9 +102,6 @@ namespace zmq ...@@ -103,9 +102,6 @@ namespace zmq
// Handle of the physical thread doing the I/O work. // Handle of the physical thread doing the I/O work.
thread_t worker; thread_t worker;
// Synchronisation of the retired event source
mutex_t retired_sync;
epoll_t (const epoll_t&); epoll_t (const epoll_t&);
const epoll_t &operator = (const epoll_t&); const epoll_t &operator = (const epoll_t&);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment