lua-users home
lua-l archive

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


>My problem is that Lua doesn't seem to be stateless. It drives the debugger
>via hooks instead of the other way around. I've figured out how to use
>lua_sethook to specify my callback functions, but what I need to do here is
>give control back to the OS and resume the interpreter later.

Lua has coroutines: you can yield control at any point in a Lua function
and resume it later. It probably fits your needs.
--lhf