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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6ff6ac051491e437 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Question about the need for requeue as described in Rationale Date: 1996/07/08 Message-ID: #1/1 X-Deja-AN: 167258728 references: <31c8fdd4.5a455349@zesi.ruhr.de> <31DAD51F.40F1@csehp3.mdc.com> <4rjimv$glk@portal.gmu.edu> <31E16AE7.2F7A@csehp3.mdc.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-07-08T00:00:00+00:00 List-Id: In article <31E16AE7.2F7A@csehp3.mdc.com>, James A. Squire wrote: >You're joking! This is actually allowed in Ada? I thought for sure it >was forbidden. In fact, I thought that was one of the reasons why the >requeue statement was needed. Now I'm really confused. It is (and always was) allowed to have nested accept statements. That is, both Ada 83 and Ada 95. So long as it's not for the same entry, or entries of the same family. >If you can have an accept within an accept, then why was the requeue >statement desirable? Maybe I'm missing the point, but: If the server task is accepting within an accept, then the server task is not available to other tasks that want service. On the other hand, if the server task creates tasks on the fly, then that's a lot of complexity and (in most implementations) inefficiency. Or, more importantly, unpredictable efficiency (in real-time apps). Requeue is certainly not NEEDED in a formal sense, but it sure does simplify and (in most implementations) make things faster. I hope you saw my previous note about how requeue can be used for preference control, and it's in the Rationale. One way to think about it is: suppose I wanted to refer to local data (of a protected object) in a barrier (of a procedure of that object). Well, that's illegal. The workaround is to use requeue. - Bob