pub fn status(&self) -> ThreadStatus {
        let lua = self.0.lua;
        unsafe {
            let thread_state =
                lua.ref_thread_exec(|ref_thread| ffi::lua_tothread(ref_thread, self.0.index));

            let status = ffi::lua_status(thread_state);
            if status != ffi::LUA_OK && status != ffi::LUA_YIELD {
                ThreadStatus::Error
            } else if status == ffi::LUA_YIELD || ffi::lua_gettop(thread_state) > 0 {
                ThreadStatus::Resumable
            } else {
                ThreadStatus::Unresumable
            }
        }
    }
/// Gets the status of the thread.
Gets the status of the thread.
Gets the status of the thread .
pub fn status(&self) -> ThreadStatus {
        let lua = self.0.lua;
        unsafe {
            let thread_state =
                lua.ref_thread_exec(|ref_thread| ffi::lua_tothread(ref_thread, self.0.index));
            let status = ffi::lua_status(thread_state);
            if status != ffi::LUA_OK && status != ffi::LUA_YIELD {
                ThreadStatus::Error
            } else if status == ffi::LUA_YIELD || ffi::lua_gettop(thread_state) > 0 {
                ThreadStatus::Resumable
            } else {
                ThreadStatus::Unresumable
            }
        }
    }
pub fn status ( & self ) -> ThreadStatus { let lua = self . 0 . lua ; unsafe { let thread_state = lua . ref_thread_exec ( | ref_thread | ffi :: lua_tothread ( ref_thread , self . 0 . index ) ) ; let status = ffi :: lua_status ( thread_state ) ; if status != ffi :: LUA_OK && status != ffi :: LUA_YIELD { ThreadStatus :: Error } else if status == ffi :: LUA_YIELD || ffi :: lua_gettop ( thread_state ) > 0 { ThreadStatus :: Resumable } else { ThreadStatus :: Unresumable } } }
Gets the status of the thread.
Gets the status of the thread .
&self
&self