lua_tothread
lua_State *co = lua_tothread(L, 1);
lua_State *co = lua_tothread(L, 1);
lua_State *co = lua_tothread(L, lua_upvalueindex(1));
LUA_API lua_State *(lua_tothread) (lua_State *L, int idx);