lua-users home
lua-l archive

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


Sometimes we need to use the whole lua vm as work unit, e.g. dispatch
the work unit among OS threads. However, it's a bit overhead at the
lua_newstate and lua_close. Is it feasible to reuse the vm after
cleanup (keep sandboxing)?

See my simple idea (it's simple and far from perfect, and it doesn't
consider registry changes via C API):
https://gist.github.com/kingluo/ad5c40047bd41ab05d5e

Any suggestion?