[Libwebsockets] libwebsocket message loop thread take 100% of the CPU

Peiffer Eric eric.peiffer at al-enterprise.com
Mon Aug 24 17:00:25 CEST 2020


Hi,

I have an application that open thousand of clients websocket and use the default event loop poll().
The thread that run the event loop execute only the following line of code:

while (n >= 0 && !interrupt) {
      n = lws_service(context, 0);
}

This work well, but sometimes this thread  take 100% of the CPU and no more callback is called.

Has anyone ever had this behaviour?

Regards,

Eric Peiffer




.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200824/aa7f58cc/attachment.htm>


More information about the Libwebsockets mailing list