lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Sep 6, 2009 at 2:09 PM, David Kastrup<dak@gnu.org> wrote:
> Consider coroutines as pretty much the same as subroutines.  The
> principal difference is that they don't give up stack, instruction
> pointer and local variables (the dynamic execution context) while
> returning execution control and return values.  They pass the buck
> without passing away.
   There's also a VM patch from Mike Pall that adds a
coroutine.clone[1] function. (Any chance that will ever become part of
the core language?) I haven't used it for anything very serious yet,
but it could potentially be very useful.

[1]: http://lua-users.org/lists/lua-l/2006-01/msg00652.html , and note
the minor correction in the followup e-mail.

--
Scott