comp.lang.ada
 help / color / mirror / Atom feed
From: adam@irvine.com (Adam Beneschan)
Subject: Same two tasks in two rendezvous?
Date: 30 Jul 2001 09:55:14 -0700
Date: 2001-07-30T16:55:14+00:00	[thread overview]
Message-ID: <b4682ab7.0107300855.2232cad1@posting.google.com> (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



             reply	other threads:[~2001-07-30 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-30 16:55 Adam Beneschan [this message]
2001-07-31 10:02 ` Same two tasks in two rendezvous? Lutz Donnerhacke
replies disabled

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