From: Brad Moore <brad.moore@shaw.ca>
Subject: Re: Timeouts in Ada
Date: Fri, 25 Jul 2014 10:15:29 -0600
Date: 2014-07-25T10:15:29-06:00 [thread overview]
Message-ID: <xovAv.72527$C87.6418@fx07.iad> (raw)
In-Reply-To: <1cbcaaba-766a-4b4d-a487-ecb77735efb2@googlegroups.com>
On 2014-07-25 3:11 AM, AdaMagica wrote:
> On Thursday, July 24, 2014 5:37:39 PM UTC+2, Robert A Duff wrote:
>
>> It makes perfect sense to enqueue on multiple entries.
>> In fact, "select call_1 or delay..." enqueues twice (once on
>> the entry call, and once on the timer queue).
>
> That wasn't my point. I just indicated the model.
>
>> Regarding your analogy: There's a supermarket near me where they have
>> just one queue, and the person at the head of the queue takes the first
>> available cash point. In a sense, they're enqueued on multiple cash
>> points. ;-) Like the multi-way call proposed (and rejected) for Ada 9X,
>> they only use one.
>
> That's a very sensible service - I often wish supermarkets here had this model. I find this only in airport counters.
>
> But this is not the same as
>
>> select
>> call_1(params);
>> or
>> call_2(params);
>> or
>> delay 10;
>> end select;
>
> In your supermarket, there is just one queue, and on the top, you are dispatched to a free cash point, and all of those do the same.
>
> In that multiple select above, the different entries all would/could do different things. In your model: You queue before a gasoline station, a shoemaker, a hardware shop, an accomodation broker; you enter the first free of those.
>
I think Randy's point (or at least one of them) is that the programmer
can already emulate this easily enough with existing Ada syntax (with a
bit more effort admittedly) so on top of the other reasons for not
implementing this, there is less motivation to introduce special syntax
when the existing syntax already provides a way to achieve the same effect.
eg.
- Declare two tasks, one whose body calls entry Call1 and the other
whose body calls Call2.
- Then instead of the select statement above, write:
delay 10.0;
abort T1;
abort T2;
Brad
next prev parent reply other threads:[~2014-07-25 16:15 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 5:18 Timeouts in Ada NiGHTS
2014-07-17 7:08 ` Simon Wright
2014-07-17 8:35 ` NiGHTS
2014-07-21 23:34 ` Randy Brukardt
2014-07-22 1:11 ` Shark8
2014-07-22 7:39 ` J-P. Rosen
2014-07-22 8:31 ` Simon Wright
2014-07-22 21:52 ` Randy Brukardt
2014-07-17 7:38 ` J-P. Rosen
2014-07-17 8:40 ` NiGHTS
2014-07-17 10:00 ` J-P. Rosen
2014-07-17 19:27 ` Jeffrey Carter
2014-07-17 19:51 ` J-P. Rosen
2014-07-17 20:52 ` Jeffrey Carter
2014-07-17 20:29 ` Adam Beneschan
2014-07-17 20:52 ` J-P. Rosen
2014-07-21 23:44 ` Randy Brukardt
2014-07-17 20:43 ` Jeffrey Carter
2014-07-21 23:37 ` Randy Brukardt
2014-07-17 7:42 ` Dmitry A. Kazakov
2014-07-17 8:59 ` NiGHTS
2014-07-17 9:48 ` Dmitry A. Kazakov
2014-07-17 17:10 ` NiGHTS
2014-07-17 20:45 ` Dmitry A. Kazakov
2014-07-17 16:12 ` Adam Beneschan
2014-07-17 16:46 ` NiGHTS
2014-07-17 17:11 ` Simon Wright
2014-07-17 17:58 ` NiGHTS
2014-07-17 19:02 ` Jeffrey Carter
2014-07-17 18:58 ` Jeffrey Carter
2014-07-17 18:12 ` Adam Beneschan
2014-07-17 19:27 ` Jeffrey Carter
2014-07-17 18:56 ` Jeffrey Carter
2014-07-23 22:37 ` Robert A Duff
2014-07-24 9:23 ` AdaMagica
2014-07-24 15:37 ` Robert A Duff
2014-07-25 5:16 ` Randy Brukardt
2014-07-25 9:11 ` AdaMagica
2014-07-25 16:15 ` Brad Moore [this message]
2014-07-25 16:34 ` Dmitry A. Kazakov
2014-07-17 19:27 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox