From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9f5633938c224117 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-02 07:08:03 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!ucberkeley!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Using Xt intrinsics with Ada? Date: 02 Feb 2001 10:06:37 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: <3A78357A.2BD8C0B1@avitech.de> <3A7A84C3.2486A6CF@avitech.de> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 981127187 15375 128.183.220.71 (2 Feb 2001 15:19:47 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 2 Feb 2001 15:19:47 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6 Xref: supernews.google.com comp.lang.ada:4856 Date: 2001-02-02T15:19:47+00:00 List-Id: Juergen Fischer writes: > Hi, > > the problem is that we don't have the runtime that blocks on the task > level but only on the process level. > Therefore we have to use non blocking sockets. The XtAppMainLoop does > really poll, > but from other C programs we know that it doesn't take much CPU load. > So we suppose that the CPU load is caused by > Ada tasking in combination with the XtAppMainLoop. Ok, now you realize that you _cannot_ avoid polling, because your OS does not provide task-level blocking sockets. Bringing in X windows stuff cannot change that. You can either get threads and sockets libraries that provide this functionality, or convert your program to a multi-process one, possibly using Ada partitions. Which OS and compiler are you using? Or perhaps you can design an acceptable polling solution; it appears that you hoped the XtAppMainLoop would be such a thing. You are more likely to be successful if you code the polling directly. Perhaps you could use the source for XtAppMainLoop as a guide. -- -- Stephe