Removed resource-related "emergency collections"

New to-be-closed variables is a better way to ensure the proper release
of resources.
This commit is contained in:
Roberto Ierusalimschy
2018-10-31 16:25:29 -03:00
parent 947a372f58
commit 2fc6b55dae
5 changed files with 2 additions and 80 deletions

View File

@@ -5535,20 +5535,6 @@ Leaves a copy of the module on the stack.
}
@APIEntry{int luaL_resourcetryagain (lua_State *L);|
@apii{0,0,m}
Try to release resources in case of errors.
This function uses @id{errno} to check whether the last error was
related to lack of resources (e.g., not enough memory or too many
open files).
If so, the function performs a full garbage collection
to try to release resources, and then it returns 1 to signal to
the caller that it is worth trying again the failed operation.
Otherwise, it returns 0.
}
@APIEntry{void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);|
@apii{nup,0,m}