lua-users home
lua-l archive

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


>From lua-l@tecgraf.puc-rio.br  Tue Feb  8 10:45:19 2000
>From: "Andre de Leiradella" <andre.leiradella@bra.xerox.com>

>Is it possible to freeze the execution of a lua program, save its state
>and, some time later, restore the saved state and resume execution from
>where it stopped?

No.

>My idea is to provide a programming environment that makes it easier to
>write cgis, freeing the programmer from having to write dozens of
>separate programs to implement one system. Instead, the program could
>be written all in once, providing the user with data (html) just before
>calling the freeze function, and resuming execution after the user
>presses the send button, making the program continue just after the
>freeze as it nothing had happened, and providing some way to access the
>form's parameters.

Why not have a single Lua interpreter running "forever" and have CGIs talk
to it?
You'll need some kind of interprocess communication, but it seems to me much
simpler than "freezing" the state of the program.
I think CGILua for Windows does something like this.
--lhf