From: Paul Chardon <paul.chardon@avions.aerospatiale.fr>
To: ericferg@aol.com
Subject: Re: Two-Way Task Communication In Ada (w/o Protected Objects)
Date: 1996/11/27
Date: 1996-11-27T00:00:00+00:00 [thread overview]
Message-ID: <329BE98B.446B9B3D@avions.aerospatiale.fr> (raw)
In-Reply-To: 19961125215900.QAA23391@ladder01.news.aol.com
ericferg@aol.com wrote:
>
> In a message dated 96-11-24 20:15:03 EST, blaak@mda.ca writes:
>
> << Two way communication with peers can be done by using a protected
> object. Just
> pretty it up with Send/Receive operations (make a Channel abstraction)
> and have
> the tasks work with a channel object to communicate.
> >>
>
> Thanks for the info. Though I didn't mention it, I was actually trying to
> AVOID intermediate protected objects between the tasks (which would act
> as shared "dequeues" or "argument buffers" ... the "Channel abstraction"
> you mention).
>
> Would anyone happen to know of any way to position or structure Ada task
> declarations such that two tasks will have visibility of each other, and
> may _directly_ invoke each other's entries (and thus provide for direct,
> two way message & argument passing, without the use of intermediate
> argument buffers)?
>
> If so, please post a reply or e-mail me at EricFerg@aol.com
>
> Thanks once again, blaak@mda.ca, for your response!
>
> Eric Ferguson
A way to do that is offer by the structure of specification and body.
You can then build such compilations units :
-----------------------
Task A is
entry entry_A;
end A;
-----------------------
Task B is
entry entry_B;
end B;
-----------------------
with A;
Task body B is
begin
...
A.entry_A;
end B;
-----------------------
with B;
Task body A is
begin
...
B.entry_B;
end A;
-----------------------
I hope it is what you mean. If not, I've buid a data structure in Ada95
with a tagged type and a task in order to make visibility possible
between two objects without to use the dependency between body and spec.
Bye, Paul.
next prev parent reply other threads:[~1996-11-27 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-25 0:00 Two-Way Task Communication In Ada (w/o Protected Objects) ericferg
1996-11-27 0:00 ` Stephen Leake
1996-11-27 0:00 ` Paul Chardon [this message]
-- strict thread matches above, loose matches on Subject: below --
1996-11-27 0:00 W. Wesley Groleau (Wes)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox