Re: High CPU usage with glib main loop



Hi Marcelo,

* Marcelo Leitner <mrl netbank com br> [2002-06-19 23:09:15]:
On Wed, Jun 19, 2002 at 10:45:32PM +0200, Morten Brix Pedersen wrote:
I have a GTK app. which uses sockets to communicate with a server, I have added
a watch on the file descriptor with g_io_add_watch() and everything works just
fine. However, sometimes the CPU usage of the app. goes to 100% and it seems
that the time is used in the glib main loop, attaching to the process in gdb
and pressing ^C almost always results in poll().

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).

Thanks a lot.

  - Morten.

--
http://wtf.dk/



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