poco icon indicating copy to clipboard operation
poco copied to clipboard

PollSet::poll on Windows always returns immediately after first connection, due to bad event socket implementation

Open obiltschnig opened this issue 8 months ago • 3 comments

PollSet uses and event fd to interrupt an ongoing poll() in wakeUp(). On POSIX platforms this uses eventfd() and works fine. On Windows, a ServerSocket is created (either as Unix domain socket or TCP socket) instead. The problem is that when that event fd is signaled, the implementation attempts to receive from it. Which is not going to work as it's a ServerSocket. So this eventfd stays signaled forever, causing high CPU load as poll() always returns immediately.

obiltschnig avatar Jun 26 '24 18:06 obiltschnig