comp.lang.ada
 help / color / mirror / Atom feed
* Same two tasks in two rendezvous?
@ 2001-07-30 16:55 Adam Beneschan
  2001-07-31 10:02 ` Lutz Donnerhacke
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Beneschan @ 2001-07-30 16:55 UTC (permalink / raw)


Is it possible for two tasks, T1 and T2, to be in two rendezvous with
each other simultaneously?

Suppose task T1, with entries E1 and E2, has the following ACCEPT:

    accept E1 do
	...
	accept E2 do
	    ...
	    ...
        end E2;
        ...
    end E1;

and T2 has the following statement:

    select
	T1.E1;   -- entry call (A)
    then abort
        ...
        T1.E2;   -- entry call (B)
        ...
    end select;

T2 hits the select statement first.  It finds that T1.E1 is not open,
so it starts executing the abortable part, which then waits at Entry
Call B.  Then T1 comes along and accepts E1.  This selects Entry Call
A.  However, as I understand the RM, this does not cause the abortable
part of the SELECT statement to be aborted, since that aborting
doesn't happen until the entry call is completed (i.e. until task T1
hits the "end E1;").  So the rendezvous proceeds, and eventually
reaches the "accept E2" statement, which will then select Entry Call
B, which T2 is waiting on.  So at that point, while the inner
rendezvous is executing, T1 and T2 have two rendezvous going on
simultaneously.

Is this what should actually happen?  Is there anything in the
language that prohibits this from happening?

				-- thanks, Adam



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-31 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-30 16:55 Same two tasks in two rendezvous? Adam Beneschan
2001-07-31 10:02 ` Lutz Donnerhacke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox