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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Timeouts in Ada Date: Thu, 17 Jul 2014 18:11:54 +0100 Organization: A noiseless patient Spider Message-ID: References: <50bdb713-7ce1-411b-810b-9bdee1d26b7a@googlegroups.com> <7581b098-ea30-4b34-a51e-2f0dd5a57563@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="5cbec41b82bafb9ba55107f02585e18b"; logging-data="4457"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FA5UUPWgP7hE1ZcgNbRmm6bH7pS/RTJU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:Y6dCx9ecC2fBQvnmq2lrhhkkMW0= sha1:I67nvXwVEs58T08TUCMlwVWgd3o= Xref: news.eternal-september.org comp.lang.ada:21006 Date: 2014-07-17T18:11:54+01:00 List-Id: NiGHTS writes: > So even if the entry call takes an hour, it will still wait the full > hour until it completes before entering the "or delay" section? This > is what I am understanding so far. After the entry call has been accepted, the timeout is cancelled; Adam's pseudocode had Wait_For_Rendezvous_To_Complete at that point. It could wait for days to complete (not that that's a good idea). > Also, can two entry calls be placed like this? > > select call_1(params) > ... > or call_2(params) > ... > or delay 10 > ... > end select > > If so, how would it know which finishes first without having them run > concurrently? Don't see a point in having them run one after the > other. Not allowed: ARM 9.7.2 [1]. > I have also seen the select used with an "else". What exactly is the > difference between "or" and "else"? Is "else" used when a "delay" is > not involved? Otherwise I don't see the point in the "else" path. This is in ARM 9.7.3. If the entry_call_alternative (the part after the select) can't be accepted immediately, the else part is executed. [1] http://www.ada-auth.org/standards/12rm/html/RM-9-7-2.html