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: "James A. Squire" Subject: Re: Question about the need for requeue as described in Rationale Date: 1996/07/08 Message-ID: <31E16AE7.2F7A@csehp3.mdc.com>#1/1 X-Deja-AN: 167244012 sender: Ada programming language references: <31c8fdd4.5a455349@zesi.ruhr.de> comments: Gated by NETNEWS@AUVM.AMERICAN.EDU content-type: text/plain; charset=us-ascii organization: MDA Avionics Tools & Processes mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01 (X11; I; HP-UX A.09.01 9000/715) Date: 1996-07-08T00:00:00+00:00 List-Id: Bo I. Sanden wrote: > > James A. Squire (m193884@CSEHP3.MDC.COM) wrote: > : I am trying to understand what problem Requeue is trying to solve and > : the above does not help me. I can see from the example given how it > : would be difficult to do the same thing in Ada83, but as I was trying to > : describe the Ada83 problem that raised the need for this, I found I > : couldn't come up with any good way of describing the problem. > > In my understanding, requeue is "needed" in Ada 95 primarily as part of > the effort to replace by protected units what was sometimes called > guardian tasks in Ada 83. Guardian tasks execute only while being > called by other task, and made a typical Ada 83 program contain more > tasks than the inherent concurrency of the problem would suggest. > (Guardian tasks where there to restrict concurrency by enforcing > synchronization of other tasks.) I know. The problem with this Ada83 solution is that it is "voluntary". There is no enforcement unless tasks voluntarily submit to it. That is why I like the Ada95 solution so much. > In Ada 83, Monitor is a guardian task and the wait is implemented by > a statement accept Release nested within the body of accept Insist. 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. If you can have an accept within an accept, then why was the requeue statement desirable? -- James Squire MDA Avionics Tools & Processes ja_squire@csehp3.mdc.com Opinions expressed here are my own and NOT my company's "one of these days I'm going to better myself by going to Knight school" "You'll be a web knight instead of a web page!"