Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: XtAddInput() steals CPU Message-ID: <1991Feb14.133503@wsl.dec.com> Date: 14 Feb 91 21:35:03 GMT References: <64966@brunix.UUCP> Sender: news@pa.dec.com (News) Reply-To: klee@wsl.dec.com Organization: DEC Western Software Laboratory Lines: 22 In article <64966@brunix.UUCP>, jhc@ivan.uucp (James H. Coombs) writes: |> I noticed that using XtAddInput() causes my application to consume CPU |> cycles constantly, even when there is no input. O'Reilly Vol. IV, p. |> 226 notes: |> |> Under the beta release of R4, the function registered with |> XtAddInput is called very frequently even when no new input is |> available.... It is difficult to tell whether this is a bug or |> the intended behavior.... Which implementation are you using? Most Xt UNIX implementations use the select() system call, so this isnt' a problem, unless you're trying to read from regular files, where select() doesn't work. Note that O'Reilly tends to over generalize from one or two examples, so their text may not apply to your system. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee