Hi, Stephen Leake wrote: > 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. I had realized this before, but from C applications I know that socket polling by means of XtAppMainLoop costs less CPU load than a directly coded polling solution. > > > 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? HP_UX 10.20 and Aonix ObjectAda 7.1.2 Juergen > > > 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