[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] infinite loop caused by incorrect behaviour of win32_dispatch() after certain amount of calls to event_active()



Hello

I have enabled debug checks and discovered that evthread_use_windows_threads() must be called before event_base_new(). Now the application has been running in debug mode without any problems for several hours. I will disable the debug mode and see how well the application is running. If no new messages from me appear in this topic, then that means the original problem was caused by instantiating libevent base before calling evthread_use_windows_threads().

Thank you for your help and the great network I/O framework that you have designed!

Best regards,
Sten Kultakangas


On Wed, Sep 27, 2017 at 12:53 AM, Azat Khuzhin <a3at.mail@xxxxxxxxx> wrote:
On Wed, Sep 13, 2017 at 11:15 PM, Sten Kultakangas <ratkaisut@xxxxxxxxx> wrote:
> Hello
>
> I have implemented a thread pool for a network service application and ran
> into the following issue. After a certain quite large amount of calls to the
> event_active() function from a thread other than the main I/O thread
> event_base_dispatch() hangs causing high CPU usage. No events are dispatched
> after that.

Hi,

Looks like some problem with threads interactions, do you use
evthread_use_windows_threads() ?
And can you try adding event_enable_debug_mode(), just before calling
any of other libevent functions

  Azat.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.