pub fn co_wrap(state: &mut LuaState) -> Result<usize, LuaError>Expand description
coroutine.wrap(f) — create a coroutine and return a resuming function.
The returned function, when called, resumes the coroutine as if by
coroutine.resume, but raises an error rather than returning false.
C: static int luaB_cowrap(lua_State *L)
Captures the new coroutine thread as upvalue 1 of aux_wrap.