I can set the environment of a Lua thread with lua_setfenv() with a thread as the target. Does this do anything other than allow you to retrieve this environment with lua_getfenv()? David Burgess