Re: High CPU usage with glib main loop
- From: Morten Brix Pedersen <morten wtf dk>
- To: Marcelo Leitner <mrl netbank com br>, gtk-app-devel-list gnome org
- Subject: Re: High CPU usage with glib main loop
- Date: Thu, 20 Jun 2002 00:28:00 +0200
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]