aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua32
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