Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/dpp/socketengines/epoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ struct DPP_EXPORT socket_engine_epoll : public socket_engine_base {

void process_events() final {
const int sleep_length = 1000;
if (sockets == 0) {
/* epoll_wait() on empty set waits forever (or until another thread inserts a socket into the set.
Comment thread
braindigitalis marked this conversation as resolved.
* We can't trust that this is going to happen, and it may deadlock the cluster, so in the event the
* set is empty, we wait a millisecond (so it isn't a busy-wait) and return.
*/
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return;
}
int i = epoll_wait(epoll_handle, events.data(), MAX_EVENTS, sleep_length);

for (int j = 0; j < i; j++) {
Expand Down
1 change: 1 addition & 0 deletions src/dpp/socketengines/kqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct DPP_EXPORT socket_engine_kqueue : public socket_engine_base {

int i = kevent(kqueue_handle, nullptr, 0, ke_list.data(), static_cast<int>(ke_list.size()), &ts);
if (i < 0) {
prune();
Comment thread
braindigitalis marked this conversation as resolved.
return;
}

Expand Down
Loading