Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!brunix!irwin!jhc From: jhc@irwin.uucp (James H. Coombs) Newsgroups: comp.windows.x Subject: Re: XtAddInput() steals CPU Message-ID: <65018@brunix.UUCP> Date: 14 Feb 91 21:44:13 GMT References: <64966@brunix.UUCP> Sender: news@brunix.UUCP Reply-To: jhc@irwin.UUCP (James H. Coombs) Organization: IRIS - Brown University Lines: 13 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.... That's because you invoked XtAddInput not only for the read but also for the write and exception conditions. The socket was always ready to write. The solution is to use XtAddInput for the read condition only, unless you really have something to write. I don't have the answer to your questions on checking the return values. --Jim