lua-users home
lua-l archive

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


Dino Patti wrote:
> I'm trying to serialize(persist) and deserialize(unpersist) a lua state
> using the Pluto lib. It seems to work fine (got good help from the author).
> But now I face a difficult task. I have to start(resume) the same place
> where I left(yielded) the original script I serialized.

Well, I thought Pluto already does that? It saves the complete call stack
of a thread including the program counter.

You can't save the running thread, so just put everything into a coroutine
and persist it when it has suspended (yielded).