diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-08-06 19:19:23 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-08-06 19:19:23 +0200 |
commit | a2770298f040307f8dd59c7a88d7e40d37faec14 (patch) | |
tree | 3ce0ec0c31be5b2f87c086488973e8957acf84ad /init.lua | |
parent | f6cc945b08e5a89492d92a88a7146da421e42819 (diff) | |
download | lua_async-a2770298f040307f8dd59c7a88d7e40d37faec14.tar.xz |
Add source code
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..749bee6 --- /dev/null +++ b/init.lua @@ -0,0 +1,32 @@ +lua_async = {} + +function lua_async.step(dtime) + -- timers phase + lua_async.timeouts.step(dtime) + lua_async.intervals.step(dtime) + + -- pending callbacks phase is done by minetest + + -- idle & prepare phase are obsolete + + -- poll phase is obsolete + + -- check phase + lua_async.immediates.step(dtime) + + -- close phase is obsolete +end + +return function(path) + for _, f in ipairs { + "timeouts", + "intervals", + "immediates", + "promises", + "async_await", + "util", + "limiting", + } do + dofile(path .. f .. ".lua") + end +end |