lua-users home
lua-l archive

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


I, too, am in need of this feature and I am guessing there are others. I
have heard that LucasArts has a port of Lua that runs in "stackless" mode
and so can halt and resume execution. Anyone know more about this?

I have been contemplating implementing something similar (perhaps even using
setjmp/longjmp), but have been waiting for Lua 4.1 and coroutines. If this
is going to be a long ways off still, maybe it's worth getting a seperate
effort going?

Eric

> -----Original Message-----
> From: owner-lua-l@tecgraf.puc-rio.br
> [mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of Gary T Dahl
> Sent: Friday, June 08, 2001 1:27 PM
> To: Multiple recipients of list
> Subject: cooperative tasks and coroutines
>
>
> Hi.
>
> Call it what you will, I want to be able to write lua scripts like this:
>
> function latentFunction()
>    doSomeStuff()
>    waitForSomeEvent()
>    doSomeOtherStuff()
> end
>
> Where waitForSomeEvent() haults execution and saves enough information
> that another function can later retrieve that information and resume
> execution.
>
> I've read a lot of the archived discussion regarding games etc. and
> downloaded LuaCC to implement a solution. Unfortunatly with LuaCC things
> like dofile()s end up trying to write outside their memory.
>
> Are there any fixes or updates or alternatives anyoneone can direct me
> towards?
>
> Thanks, Gary.
>