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,1b417df64012e6d3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-17 06:54:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!lon1-news.nildram.net!peernews!peer.cwci.net!news5-gui.server.ntli.net!ntli.net!news11-gui.server.ntli.net.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: <%12l8.9656$%_6.1717935@news11-gui.server.ntli.net> Subject: Re: tasks, protected types and entries X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: <562l8.9685$%_6.1720374@news11-gui.server.ntli.net> Date: Sun, 17 Mar 2002 14:55:17 -0000 NNTP-Posting-Host: 213.104.128.62 X-Complaints-To: abuse@ntlworld.com X-Trace: news11-gui.server.ntli.net 1016376833 213.104.128.62 (Sun, 17 Mar 2002 14:53:53 GMT) NNTP-Posting-Date: Sun, 17 Mar 2002 14:53:53 GMT Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:21366 Date: 2002-03-17T14:55:17+00:00 List-Id: "chris.danx" wrote in message news:%12l8.9656$%_6.1717935@news11-gui.server.ntli.net... > Hi, > > What is the difference between an entry and a procedure? I think the > difference is that a procedure will always execute regardless of any > condition, but that an entry can have a guard to allow/prevent its execution > if a given condition is satisfied. > > So for a (protected) queue, the procedure Enqueue (someitem) would run in > any circumstance and the entry Dequeue (an_item: out sometype) would run > only when it is sensible to do so. i.e. when there are items in the Queue. That's ambiguous. I meant to say, "the procedure Enqueue (someitem) would run when called, but the entry Dequeue (an_item : out sometype) would run when called, but only when it made sense to do so. i.e. when there are items in the Queue." Another thought: Calls to entries can time out, right? Does that mean after a certain time of the Queue being empty the calling task will abandon the call to Dequeue, possibly doing something else? Chris