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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8e240cec570cdf2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-18 11:57:22 PST Path: supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison Sender: usenet@www.newsranger.com References: <9bkevj$61k$1@nh.pace.co.uk> Subject: Re: Multiple entry tasks Message-ID: <8slD6.1888$D4.184457@www.newsranger.com> Date: Wed, 18 Apr 2001 18:57:08 GMT NNTP-Posting-Host: 209.208.22.130 X-Complaints-To: abuse@newsranger.com X-Trace: www.newsranger.com 987620228 209.208.22.130 (Wed, 18 Apr 2001 14:57:08 EDT) NNTP-Posting-Date: Wed, 18 Apr 2001 14:57:08 EDT Organization: http://www.newsranger.com Xref: supernews.google.com comp.lang.ada:6982 Date: 2001-04-18T18:57:08+00:00 List-Id: In article , Ted Dennison says... > >In article <9bkevj$61k$1@nh.pace.co.uk>, Marin David Condic says... >> >>select >> when (Entry2'Count <= 0) and (Entry1'Count <= 0) => >> accept Entry3 ; > >or > >> when (Entry1'Count <= 0) => >> accept Entry2 ; >>or >> accept Entry1; >>else >> terminate; >>end select ; > > >I don't think the guards get recalcuated when new entries come in, only when the >top of the select statement is reached. Thus if nothing is available then, it >will continue to wait indefinitely for Entry1, even if an Entry2 or Entry3 comes >in later. Doh! I misread the conditionals. If waiting occurs, all the guards will be *open*. That should work fine (assuming the "or" is added, of course). If multiple rendezvous become active before this task gets around to accepting one, I suppose the priority principle could be violated. But that's a pretty marginal case. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com