High CPU usage with glib main loop
- From: Morten Brix Pedersen <morten wtf dk>
- To: gtk-app-devel-list gnome org
- Subject: High CPU usage with glib main loop
- Date: Wed, 19 Jun 2002 22:45:32 +0200
Hi,
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().
It's not because data is coming in on the socket all the time, CPU usage
is at 100% even when the client is idling.
A minor note: It *seem* that it only occurs when connected to two
servers (that is, two sockets and therefor two watches)
Does anyone have any ideas on how to fix this?
Thanks.
- Morten.
--
http://wtf.dk/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]