]> git.lizzy.rs Git - lua_async_mt.git/blob - README.md
Use lua_async.kill_thread
[lua_async_mt.git] / README.md
1 # lua_async_mt
2 Wrapper for lua_async to use it as a minetest mod.
3 Executed the event loop every globalstep.
4
5 See https://github.com/EliasFleckenstein03/lua_async for API documentation.
6
7 ## Utility functions
8
9 ### `lua_async.mt_validate_objs([obj1, obj2, ...])`
10 Must be called from an async function.
11 Validates all Minetest ObjectRefs passed as arguments, meaning it checks if they have been removed (in the case of luaentities) or left the game (in the case of players). If one of the refs is not valid, the current thread dies - essentially meaning _this function never returns_ if one of the ObjectRefs is not valid. An error is raised if arguments are given to this function that are not ObjectRefs at all.