Re: High CPU usage with glib main loop



Morten Brix Pedersen <morten wtf dk> writes:

Well, I had the same problem.. but it ocurred only when I had
a dead socket been watched.. I mean, the other side closed the
connection, or even me, and I didn't remove glib's watcher from
it.. then I used to get 100% cpu usage..

I think you're right. I can't seem to reproduce it anymore (but it was
never really easy to reproduce).

What could have been happening is that the connection was closed and
you get a HANGUP event. If ignore that event and don't remove the
watch, GLib will generate HANGUP events over and over. 100% CPU usage
and a lot of time spent in poll() would be symptoms of this.

Søren



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