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: bsanden@site.gmu.edu (Bo I. Sanden) Subject: Re: Question about the need for requeue as described in Rationale Date: 1996/07/09 Message-ID: <4rsdfp$jo5@portal.gmu.edu>#1/1 X-Deja-AN: 167297199 references: <31c8fdd4.5a455349@zesi.ruhr.de> <31E16AE7.2F7A@csehp3.mdc.com> content-type: text/plain; charset=US-ASCII organization: George Mason University, Fairfax, Virginia, USA mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-07-09T00:00:00+00:00 List-Id: James A. Squire (m193884@CSEHP3.MDC.COM) wrote: : > 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? : -- As I see it, the advantage is that you can do away with the guardian task and accomplish what you want with a protected unit. You end up with one less thread and, arguably, a simpler program. The requeue is primarily useful in protected units, in my experience. --------------------------------------------------------------------- Dr. Bo Sanden Author of: Mail Stop 4A4 Software Systems Construction George Mason University with examples in Ada Fairfax, VA 22030-4444, USA Prentice-Hall 1994 Tutorials on concurrent/real-time software design at WAdaS and TRI-Ada http://www.isse.gmu.edu/faculty/bsanden ---------------------------------------------------------------------