libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Lots of CPU usage with MHD_USE_POLL


From: Boyan Kasarov
Subject: [libmicrohttpd] Lots of CPU usage with MHD_USE_POLL
Date: Mon, 08 Feb 2010 10:31:15 +0200

Hello,

I noticed that in function:

static int
MHD_poll (struct MHD_Daemon *daemon)
{
...
    if (poll(&p, 1, 0) < 0) {
...
}

The timeout for poll() call is 0 milliseconds, so the call does not
block at all, which causes lots of CPU usage.

As a workaround I changed the timeout from 0 to 1000 (1 second) and it
works fine for me.

-- 
Boyan Kasarov <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]