comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: confusion about message passing between the tasks
Date: Sun, 26 Oct 2014 19:18:07 -0700
Date: 2014-10-26T19:18:07-07:00	[thread overview]
Message-ID: <m2ka0p$ma5$1@dont-email.me> (raw)
In-Reply-To: <wcch9yqnxtq.fsf@shell01.TheWorld.com>

On 10/26/2014 05:46 PM, Robert A Duff wrote:
> 
> In the PO case, we know that if Entry_1 was not acceptable, then Entry_2
> must be (at that time).  In the "select/accept" case, there is a moment
> in time when neither entry is acceptable (when T is going around that
> loop, jumping back to the "select").
> 
> OTOH, perhaps you mean that "pragma Passive_Task" should change the
> semantics of loop statements containing selects (and nothing else) such
> that that window doesn't happen.  That could work, I suppose, but it
> means that the pragma is not just an optimization, but has a subtle
> semantic effect.  I'm not sure how to even write RM wording to capture
> that.

DEC Ada, and I think one other Ada-83 compiler, had pragma Passive (or something
similar) which had the effect of optimizing the task so that it didn't have a
thread of control. The task didn't have a time when it wasn't ready to accept
one of the entries. It was effectively a PO.

Back in the 1980s I heard presentations by compiler writers on automatically
recognizing and optimizing passive tasks, and heard them say that they thought
that the language designers expected that compilers would do that. As with
variant records that only take up the space needed by the current instance, for
which I've heard a similar claim, most compilers didn't do this.

However, Ada 95 could have standardized the pragma and made it mandatory. This
would have saved a new reserved word, and the result wouldn't have had any
restrictions on what could go in an accept. I always thought it was a mistake to
throw away all that work for a new construct.

-- 
Jeff Carter
"Why, the Mayflower was full of Fireflies, and a few
horseflies, too. The Fireflies were on the upper deck,
and the horseflies were on the Fireflies."
Duck Soup
95


  reply	other threads:[~2014-10-27  2:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24 16:44 confusion about message passing between the tasks compguy45
2014-10-24 18:39 ` Ludovic Brenta
2014-10-25  1:51   ` compguy45
2014-10-25  7:13     ` Ludovic Brenta
2014-10-24 23:49 ` Stribor40
2014-10-25  7:03   ` Ludovic Brenta
2014-10-25  7:58 ` Simon Wright
2014-10-25 13:01   ` compguy45
2014-10-25 14:11     ` Simon Wright
2014-10-25 17:25 ` Dennis Lee Bieber
2014-10-25 17:54   ` Jeffrey Carter
2014-10-25 22:23     ` Robert A Duff
2014-10-25 23:26       ` compguy45
2014-10-26  4:50         ` Dennis Lee Bieber
2014-10-26 10:20         ` Georg Bauhaus
2014-10-26  5:37       ` J-P. Rosen
2014-10-26  8:14         ` Pascal Obry
2014-10-26 15:47           ` J-P. Rosen
2014-10-26 20:27         ` Robert A Duff
2014-10-26 20:31           ` Robert A Duff
2014-10-26 20:36             ` Jeffrey Carter
2014-10-26 22:27               ` Robert A Duff
2014-10-26 23:23                 ` Jeffrey Carter
2014-10-27  0:46                   ` Robert A Duff
2014-10-27  2:18                     ` Jeffrey Carter [this message]
2014-10-27  7:51                     ` J-P. Rosen
2014-10-27  7:44             ` J-P. Rosen
2014-10-26 20:42           ` Dmitry A. Kazakov
2014-10-26 21:15             ` Brad Moore
2014-10-27  9:22               ` Dmitry A. Kazakov
2014-10-26 22:20             ` Robert A Duff
2014-10-27  7:40           ` J-P. Rosen
2014-10-25 23:42 ` compguy45
2014-10-25 23:55   ` compguy45
2014-10-26  0:24     ` Jeffrey Carter
2014-10-26  0:41       ` compguy45
2014-10-26 11:30         ` Brian Drummond
2014-10-26 15:40     ` Simon Wright
replies disabled

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