Menu

#25 Fix excessive CPU usage due to unhandled POLLOUT events, and fix off-by-one

Unstable_(example)
open
nobody
None
1
2019-04-04
2019-04-04
No

In the default main loop, POLLOUT events on unlock fd are not handled, which can cause the program to spin on the CPU as it is woken to handle POLLOUT, does nothing, and calls poll2) again, over and over. Problem was observed with the textsuggest-server program from https://gitlab.com/bharadwaj-raju/TextSuggest which relies on libdbus-c++'s default main loop.

Also add a missing increment of the nfd counter.

Patch attached.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.