At 08:27 PM 6/8/2002 +0200, Jerome Vouillon wrote:
>On Sat, Jun 08, 2002 at 12:20:55PM -0400, Melvin Smith wrote:
> > What would that accomplish?
> >
> > If yield is to suspend the current coroutine and return back to the
> > controlling context, you don't need an argument to yield, unless you
> > wish to yield and jump to a different address than you were called
> > from, but is that the semantics of a co-routine yielding?
>
>You mentioned in a previous mail:
>   "On a return, we can set the entry address back to the "start" of the
>    co-routine for another call."
>The argument to the "yield" opcode was intended to allow this.
>But you're right: one could just as well put a "branch" just after
>the "yield".

I'm confused. Why does the yield want to set the return address of
the coroutine back to the start?

Given that I've never implemented them before, I'm not saying the way
I'm doing it is right.

I assume yield should suspend the co-routine, return to its caller,
and the caller can 'call' the co-routine again. Do I have the semantics
wrong?

-Melvin

Reply via email to