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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,e8e240cec570cdf2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-20 07:25:03 PST Path: supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!crtntx1-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!opentransit.net!wanadoo.fr!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Multiple entry tasks Date: Fri, 20 Apr 2001 16:17:31 +0200 Organization: Adalog Message-ID: <9bpgnu$blc$1@s1.read.news.oleane.net> References: <9bkevj$61k$1@nh.pace.co.uk> <9bm76r$mf6$1@s1.read.news.oleane.net> <9bmuo9$50h$1@s1.read.news.oleane.net> NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 987776575 11948 195.25.228.57 (20 Apr 2001 14:22:55 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 20 Apr 2001 14:22:55 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Xref: supernews.google.com comp.lang.ada:7038 Date: 2001-04-20T16:17:31+02:00 List-Id: "Ted Dennison" a �crit dans le message news: sMGD6.3326$D4.330928@www.newsranger.com... > Ahhh. I didn't think about timed entry calls. Hmmm. So you are saying that the > runtime can change the state of the entry queues between the start of a select > statement and its decision to block or immediately accept an entry? In that > case, an "abort"ed task would hose him as well, right? The point in general is that the 'Count attribute returns the length of the queue at the time it is called, but that it can increase or decrease (due to timed entry calls or -you're right- abort) at any time. You can use it for optimization purpose; for example, you might want to serve the longest queue first. If there is a race condition, you may very rarely choose a queue that is suboptimal by 1 - that's acceptable. But 'Count should not be used in an all-or-nothing context. > Generally I find that one has to be very carful about using timed or tenative > entry calls. As a general rule, you have to be damn sure that the server will at > some point sit and wait for your entry. If there's an "else" or "delay" clause > on the server's selective wait, you can get into a nasty case of livelock. Since > I generally need to use one of those clauses, I don't use timed or tenative > rendezvous very much. Timed entry calls are very useful: a client may well want to do something else if the server does not accept a request within a given time frame. You might well argue that in some contexts, all calls must be timed (i.e. ensure not infinite blocking). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr