From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Using Xt intrinsics with Ada?
Date: 31 Jan 2001 13:14:33 -0500
Date: 2001-01-31T18:27:48+00:00 [thread overview]
Message-ID: <uae87si5y.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 3A78357A.2BD8C0B1@avitech.de
J�rgen Grigat <juergen.grigat@avitech.de> writes:
> 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.
This seems an awkward approach. You are using a windowing system to
get tasking; just use Ada tasking!
Allocate one task for each socket connection, that does blocking reads
and writes to the socket. Then have a central task that rendezvous
with the per-socket tasks.
You will need a runtime that blocks at the task level, not the process level.
> 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.
I'm not sure, but I would bet that XtAppMainLoop is polling, looking
for events! So you haven't accomplished anything.
> Has anyone experience in using X Toolkit events in Ada tasking
> programs?
>
> Thanks for any hints.
>
> J�rgen
--
-- Stephe
next prev parent reply other threads:[~2001-01-31 18:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-31 15:55 Using Xt intrinsics with Ada? Jürgen Grigat
2001-01-31 18:14 ` Stephen Leake [this message]
2001-02-02 9:58 ` Juergen Fischer
2001-02-02 12:00 ` Jeff Creem
2001-02-02 15:02 ` Ted Dennison
2001-02-02 15:43 ` Juergen Fischer
2001-02-02 19:30 ` Ted Dennison
2001-02-02 15:06 ` Stephen Leake
2001-02-02 15:48 ` Juergen Fischer
2001-02-05 15:06 ` Stephen Leake
2001-02-02 15:21 ` Robert Dewar
2001-01-31 19:19 ` Ted Dennison
2001-01-31 21:07 ` Ted Dennison
2001-01-31 21:40 ` Mario Klebsch
2001-02-02 16:26 ` Juergen Fischer
2001-01-31 19:42 ` Kevin Kronmiller
2001-02-01 11:55 ` Tarjei T. Jensen
2001-02-02 16:08 ` Des Walker
2001-02-02 16:40 ` Juergen Fischer
2001-02-03 14:37 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox