From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: multiple delay alternative
Date: Mon, 5 Mar 2018 18:37:13 +0100
Date: 2018-03-05T18:37:13+01:00 [thread overview]
Message-ID: <p7jv89$lvj$1@dont-email.me> (raw)
In-Reply-To: <1ea2c751-5a0a-47c2-aef4-96f137ee7628@googlegroups.com>
On 03/05/2018 02:50 PM, Mehdi Saada wrote:
> It stands to reason that
> select
>> delay <time>;
>> <entry call>;
>> or
>> delay <time>;
>> <entry call>;
>> or
>> delay <time>;
>> <entry call>;
>> end select;
This is confusing. Because it mentions entry calls, one might think it's a timed
entry call, but that only allows a single delay alternative. And you don't
usually have both a delay and an entry call in the same branch. A selective
accept can have multiple delay alternatives, but has accept statements rather
than entry calls. Again, you don't usually have a delay and an accept in the
same branch.
> is not allowed for the caller, or you could try and call on multiple entrees at the same time, and pick up on of them... meaningless.
In Ada, you can do
select
Entry_1;
then abort
Entry_2;
end select;
Need more than 2? No problem; these can be nested
select
Entry_1;
then abort
select
Entry_2;
then abort
Entry_3;
end select;
end select;
The semantics of this seem somewhat confusing, though. While it's possible that
only one of the entry calls will complete, it's also possible that any number of
them will complete, including all of them.
--
Jeff Carter
"All citizens will be required to change their underwear
every half hour. Underwear will be worn on the outside,
so we can check."
Bananas
29
next prev parent reply other threads:[~2018-03-05 17:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-04 18:22 multiple delay alternative Mehdi Saada
2018-03-05 0:21 ` Mehdi Saada
2018-03-05 4:08 ` Bojan Bozovic
2018-03-05 10:17 ` Robert Eachus
2018-03-05 8:15 ` Dmitry A. Kazakov
2018-03-05 9:23 ` AdaMagica
2018-03-05 10:32 ` Bojan Bozovic
2018-03-05 13:50 ` Mehdi Saada
2018-03-05 14:35 ` Dmitry A. Kazakov
2018-03-05 15:09 ` Mehdi Saada
2018-03-06 11:05 ` Dmitry A. Kazakov
2018-03-05 17:37 ` Jeffrey R. Carter [this message]
2018-03-05 23:28 ` Simon Wright
2018-03-06 0:11 ` Anh Vo
2018-03-06 1:50 ` Mehdi Saada
2018-03-06 6:00 ` Robert Eachus
2018-03-06 6:03 ` J-P. Rosen
2018-03-06 16:36 ` Jeffrey R. Carter
2018-03-06 10:31 ` Mehdi Saada
2018-03-06 11:18 ` Dmitry A. Kazakov
2018-03-06 13:43 ` Mehdi Saada
2018-03-06 15:17 ` Dmitry A. Kazakov
2018-03-06 20:06 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox