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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6d5b546da2b20daa X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Multiple Delay alternatives : what it is useful to ? Date: Thu, 04 Feb 2010 10:26:22 +0100 Organization: Adalog Message-ID: <8s3ekh.nk5.ln@hunter.axlog.fr> References: <77f81f9d-23a2-4d59-a547-c577e009c50c@19g2000yql.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1265280964 3435 195.25.228.57 (4 Feb 2010 10:56:04 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 4 Feb 2010 10:56:04 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <77f81f9d-23a2-4d59-a547-c577e009c50c@19g2000yql.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:8882 Date: 2010-02-04T10:26:22+01:00 List-Id: Hibou57 (Yannick Duch�ne) a �crit : > Hi all out there, > > [ARM 9.7.1(10)] and [ARM 9.7.1(13)], > http://www.adaic.org/standards/05rm/html/RM-9-7-1.html > explicitly allows multiple Delay alternatives in a Select statement > (finally GNAT was right), as I've checked. > > Know I now it is legal, I just wonder why ? > > If some delays stand for a time which is sooner than others delays > alternatives, the others will never be triggered. Or they may be ? > Does it have something to deal with variable delay ? If it is, the > runtime will then simply select the sooner ignoring all others ? The shortest one will be triggered. Why allow several? Because the delays need not be static, so which is one is shorter may not be determined at compile time, and several time-out may correspond to different conditions, with different attached processing. select ... or delay until dawn; ... or delay until closing_time; ... end select; > > And what if two delays stands for the same time ? I do not see > anything which clarify this situation in the RM (may be I've missed > it). one of them is selected arbitrarily, unless a queuing policy says otherwise (9.7.1(18)) > Are they some real life examples of useful multiple delays > alternatives ? See above ;-) > By the way, a sentence is unclear to me : at 9.7.1(10), there is a � > If a selective_accept contains more than one delay_alternative, then > all shall be delay_relative_statements, or all shall be > delay_until_statements for the same time type. � .... same time type ? > I could not construe these last three words. The expression of a delay until statement expects a value of a time type (9.6(6)). Time types are implementation defined. The idea is that if you have a board with several hardware clocks, the implementation would define a time type for each of them; the type of the expression would determine which clock to use for the delay. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr