comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Finalization of a record containing a task
Date: Mon, 21 Feb 2005 18:15:40 -0600
Date: 2005-02-21T18:15:40-06:00	[thread overview]
Message-ID: <UvadnWTYOYLf5IffRVn-tA@megapath.net> (raw)
In-Reply-To: wccll9h4mm6.fsf@shell01.TheWorld.com

"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
news:wccll9h4mm6.fsf@shell01.TheWorld.com...
...
> Note that it was proposed during Ada 9X to allow multiple entry calls,
> as in:
>
>     select
>         X.Some_Entry(...);
>     or
>         Y.Some_Other_Entry(...); -- illegal!
>     end select;
>
> which would mean pick whichever entry call becomes ready first
> (similar to the multiple accept case).
> Sadly, that didn't make it into Ada 95 (nor Ada 2005).
> I don't know of any semantic anomalies; I think it was just
> considered too hard to implement.

Nothing sad about it. The Ada 9X office required all of the U-I teams to
make a detailed report. I remember spending a lot of time on that. The
conclusion of all of the reports was that it would have ended being
implemented as a busy-wait loop on virtually all systems, and thus it would
look cheap while the implementation would have been very expensive. (And the
users that were clamoring for it, the hard real-time people, would have
never actually used it in practice.) Those reports are still available
somewhere in the archives (archive.adaic.com).

Specifically, the calls above would end up implemented similarly to:

   loop
     select
         X.Some_Entry(...);
     else null;
     end select;
     select
         Y.Some_Other_Entry(...); -- illegal!
     else null;
     end select;
     delay <some appropriate amount>; -- Let other tasks run.
  end loop;

so you might as well write the above if it really is needed.

                         Randy.






  reply	other threads:[~2005-02-22  0:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-16 20:35 Finalization of a record containing a task Bj?rn
2005-02-16 20:49 ` Stephen Leake
2005-02-16 21:20   ` Adrien Plisson
2005-02-16 22:09     ` Robert A Duff
2005-02-17  8:24       ` Adrien Plisson
2005-02-18  0:17         ` Robert A Duff
2005-02-17  9:13     ` Dmitry A. Kazakov
2005-02-18  0:13       ` Robert A Duff
2005-02-18  2:34         ` Randy Brukardt
2005-02-18 11:27         ` Dmitry A. Kazakov
2005-02-16 22:08   ` Robert A Duff
2005-02-21 13:20     ` Craig Carey
2005-02-21 21:41       ` Robert A Duff
2005-02-22  0:15         ` Randy Brukardt [this message]
2005-02-17 17:50   ` Bj?rn
replies disabled

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