Commit 75e945f1 authored by Simon Giesecke's avatar Simon Giesecke

Problem: epoll_t employs an unnecessary mutex

Solution: remove the mutex
parent 4a18ed67
......@@ -112,9 +112,7 @@ void zmq::epoll_t::rm_fd (handle_t handle_)
int rc = epoll_ctl (_epoll_fd, EPOLL_CTL_DEL, pe->fd, &pe->ev);
errno_assert (rc != -1);
pe->fd = retired_fd;
_retired_sync.lock ();
_retired.push_back (pe);
_retired_sync.unlock ();
// Decrease the load metric of the thread.
adjust_load (-1);
......@@ -209,13 +207,11 @@ void zmq::epoll_t::loop ()
}
// Destroy retired event sources.
_retired_sync.lock ();
for (retired_t::iterator it = _retired.begin (); it != _retired.end ();
++it) {
LIBZMQ_DELETE (*it);
}
_retired.clear ();
_retired_sync.unlock ();
}
}
......
......@@ -106,9 +106,6 @@ class epoll_t : public worker_poller_base_t
// Handle of the physical thread doing the I/O work.
thread_t _worker;
// Synchronisation of retired event sources
mutex_t _retired_sync;
epoll_t (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