Move DCB owner selection into Listener

The code that selects which worker to assign the DCB to is now completely
in the Listener class. This removes the need to change the ownership of a
DCB after it has been allocated.
This commit is contained in:
Markus Mäkelä
2019-04-26 10:54:57 +03:00
parent 510cae2fe0
commit ea14331d18
6 changed files with 20 additions and 60 deletions

View File

@ -412,6 +412,7 @@ bool RoutingWorker::add_shared_fd(int fd, uint32_t events, MXB_POLL_DATA* pData)
ev.events = events;
ev.data.ptr = pData;
// The main worker takes ownership of all shared fds
pData->owner = RoutingWorker::get(RoutingWorker::MAIN);
if (epoll_ctl(this_unit.epoll_listener_fd, EPOLL_CTL_ADD, fd, &ev) != 0)