Sounds like a job for select() unless I misunderstand your problem. Kevin Kronmiller In article <3A78357A.2BD8C0B1@avitech.de>, =?iso-8859-1?Q?J=FCrgen?= Grigat wrote: > Hi, > > we are developing a program in Ada that has connections to other processes by > sockets. The calls are done in Ada by using interfaces to C library functions. > In order to avoid polling we wonder if we can use the event mechanism of X > Toolkit Intrinsics. So we created a task which is calling a C- routine that > itself calls XtAppMainLoop. The main program is an Ada routine. > From the functional point of view this seems to work. But we recognize a heavy > CPU load even there is no traffic at the connection. > > Has anyone experience in using X Toolkit events in Ada tasking programs? > > Thanks for any hints. > > J�rgen > > Sent via Deja.com http://www.deja.com/