comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Question about the need for requeue as described in Rationale
Date: 1996/07/08
Date: 1996-07-08T00:00:00+00:00	[thread overview]
Message-ID: <Du8tJ2.FBB@world.std.com> (raw)
In-Reply-To: 31E16AE7.2F7A@csehp3.mdc.com


In article <31E16AE7.2F7A@csehp3.mdc.com>,
James A. Squire <m193884@CSEHP3.MDC.COM> 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




  reply	other threads:[~1996-07-08  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-20  0:00 GNAT Codesize Haug Buerger
1996-06-20  0:00 ` James E. Hopper
1996-06-21  0:00 ` Doug Smith
1996-06-21  0:00 ` Robert Dewar
1996-06-24  0:00   ` John McCabe
1996-06-24  0:00     ` John Howard
1996-06-25  0:00       ` David J. Fiander
1996-06-25  0:00       ` Robert Dewar
1996-06-26  0:00     ` Robert Dewar
1996-06-28  0:00       ` John McCabe
1996-06-28  0:00         ` Fergus Henderson
1996-06-29  0:00           ` John McCabe
1996-07-01  0:00             ` Robert Dewar
1996-07-05  0:00               ` John McCabe
1996-07-05  0:00             ` JP Thornley
1996-06-30  0:00         ` Robert Dewar
1996-07-02  0:00           ` John McCabe
1996-07-03  0:00             ` Robert Dewar
1996-06-28  0:00       ` Fergus Henderson
1996-07-01  0:00         ` Michael Feldman
1996-07-03  0:00           ` John McCabe
1996-07-02  0:00         ` John McCabe
1996-07-03  0:00           ` Robert Dewar
1996-07-06  0:00             ` John McCabe
1996-07-06  0:00               ` Robert Dewar
1996-07-06  0:00               ` Michael Feldman
1996-07-08  0:00             ` Gavin Smyth
1996-07-03  0:00   ` Question about the need for requeue as described in Rationale James A. Squire
1996-07-05  0:00     ` Bo I. Sanden
1996-07-05  0:00       ` progers
1996-07-06  0:00     ` Robert A Duff
1996-07-04  0:00   ` Samuel Tardieu
1996-07-04  0:00     ` Robert Dewar
1996-07-08  0:00   ` James A. Squire
1996-07-09  0:00     ` progers
1996-07-10  0:00     ` Robert A Duff
1996-07-10  0:00       ` progers
1996-07-08  0:00   ` James A. Squire
1996-07-08  0:00   ` James A. Squire
1996-07-08  0:00     ` Robert A Duff [this message]
1996-07-09  0:00     ` Bo I. Sanden
1996-07-09  0:00   ` Jon S Anthony
1996-06-21  0:00 ` GNAT Codesize Ralph Paul
1996-07-08  0:00 ` Question about the need for requeue as described in Rationale James A. Squire
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox