caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jerome Vouillon <Jerome.Vouillon@pps.jussieu.fr>
To: Matt Gushee <matt@gushee.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] LablGTK app maxes out CPU
Date: Fri, 7 Jul 2006 15:40:40 +0200	[thread overview]
Message-ID: <20060707134040.GA6203@strontium.pps.jussieu.fr> (raw)
In-Reply-To: <44ADA1E9.7070106@gushee.net>

On Thu, Jul 06, 2006 at 05:51:05PM -0600, Matt Gushee wrote:
> Okay, I've done the strace. I found something that appears to be 
> significant, but I don't really understand it. After the GUI is 
> displayed, there are a number of GTK library calls, and then some 
> searches for various resources--locale files, fonts, icons--and then this:
[...]
> poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN, revents=POLLHUP}], 2, 
> -1) = 1
> 
> The last two lines are then repeated around 18000 times (identically 
> each time, as far as I can see), until the 'quit' command is received. 
> This takes place over a span of perhaps 30 seconds of real time. So 
> pretty clearly this is the CPU-eating behavior, but I still can't see 
> what is triggering it. By the way, FD #7 is my FIFO.

The POLLHUP events means that the other side of the FIFO has been
closed.  Thus, you should stop listening on the FIFO.  To be portable,
you should also stop listening when you receive a POLLIN event but
there is nothing to be read.  (Mac OS, for instance, returns POLLIN
when Linux would return POLLHUP.)

-- Jerome


      parent reply	other threads:[~2006-07-07 13:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 18:30 Matt Gushee
2006-07-04 18:59 ` [Caml-list] " Matt Gushee
2006-07-04 19:12 ` Eric Cooper
2006-07-04 20:00   ` Matt Gushee
2006-07-04 20:21     ` Eric Cooper
2006-07-05 23:24       ` Matt Gushee
     [not found]         ` <Pine.LNX.4.64.0607060354120.6166@home.oyster.ru>
2006-07-06  0:27           ` Matt Gushee
2006-07-06  2:46         ` Matt Gushee
2006-07-06 16:51         ` Jerome Vouillon
2006-07-06 19:16           ` Matt Gushee
2006-07-06 23:51           ` Matt Gushee
2006-07-07  1:26             ` SOLVED -- " Matt Gushee
2006-07-07 13:40             ` Jerome Vouillon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060707134040.GA6203@strontium.pps.jussieu.fr \
    --to=jerome.vouillon@pps.jussieu.fr \
    --cc=caml-list@inria.fr \
    --cc=matt@gushee.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).