Ejemplo n.º 1
0
        public int Resume(object[] args, LuaTable env)
        {
            int result = 0;
            int oldTop = LuaDLL.lua_gettop(L);

            // If thread isn't started, it needs to be restarted
            if (start)
            {
                start = false;
                func.push(L);

                if (env != null)
                {
                    env.push(L);
                    LuaDLL.lua_setfenv(L, -2);
                }

                result = resume(args, oldTop);
            }
            // If thread is suspended, resume it
            else if (IsSuspended())
            {
                result = resume(args, oldTop);
            }

            return(result);
        }