comp.lang.ada
 help / color / mirror / Atom feed
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: Icon Co-Expressions in Ada
Date: 1998/12/17
Date: 1998-12-17T00:00:00+00:00	[thread overview]
Message-ID: <Pine.A41.3.96-heb-2.07.981217210045.15552B-100000@pluto.mscc.huji.ac.il> (raw)
In-Reply-To: u1zlyznoc.fsf@gsfc.nasa.gov

On 17 Dec 1998, Stephen Leake wrote:

> Ehud Lamm <mslamm@mscc.huji.ac.il> writes:
> 
> I think I understand "suspend"; it's what Knuth calls a "coroutine". I'm not
> clear what "suspend <integer>" means?

It is like return <integer>, only that the function's execution can be
resumed.

> 
> You definitely need tasks to do this in Ada, since the task stack is
> where the procedure state is saved. At each "suspend", you could have
> an accept statement. The caller would still have to write a loop to
> get the goal-directed behavior.

This, indeed, is the reason I mentioned tasks in the first place. I just
wanted to emphesize that this mechanism is less general than Ada tasking.

> Ok; Ada tasks are executedin parallel...

You don't say :-)

I was thinking along the lines of the user coding a routine and invokin
procedures which will you tasking capabilites in a limted way. Enough for
suspend etc. but not general tasking.

However as I mentioned in my first post on this topic, this can not be
done since a task must clearly be marked as such.

Ehud Lamm mslamm@mscc.huji.ac.il 
http://www2.cybercities.com/e/ehud/ada  Ada&SE and Ada challanges






  reply	other threads:[~1998-12-17  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  0:00 Icon Co-Expressions in Ada Ehud Lamm
1998-12-16  0:00 ` dennison
1998-12-16  0:00 ` Stephen Leake
1998-12-16  0:00   ` Al Christians
1998-12-17  0:00   ` Ehud Lamm
1998-12-17  0:00     ` Mats Weber
1998-12-17  0:00       ` Ehud Lamm
1998-12-17  0:00       ` Chris Morgan
1998-12-17  0:00     ` Stephen Leake
1998-12-17  0:00       ` Ehud Lamm [this message]
1998-12-17  0:00   ` Mats Weber
1998-12-17  0:00     ` Ehud Lamm
replies disabled

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