From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx07.iad.POSTED!not-for-mail From: Brad Moore User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Timeouts in Ada References: <50bdb713-7ce1-411b-810b-9bdee1d26b7a@googlegroups.com> <7581b098-ea30-4b34-a51e-2f0dd5a57563@googlegroups.com> <00aae9b5-42e8-40e8-a2dd-7e56ecd2bca3@googlegroups.com> <1cbcaaba-766a-4b4d-a487-ecb77735efb2@googlegroups.com> In-Reply-To: <1cbcaaba-766a-4b4d-a487-ecb77735efb2@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 68.145.219.148 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: 1406304925 68.145.219.148 (Fri, 25 Jul 2014 16:15:25 UTC) NNTP-Posting-Date: Fri, 25 Jul 2014 16:15:25 UTC Date: Fri, 25 Jul 2014 10:15:29 -0600 X-Received-Bytes: 3053 X-Received-Body-CRC: 3205118807 Xref: news.eternal-september.org comp.lang.ada:21212 Date: 2014-07-25T10:15:29-06:00 List-Id: 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