]> git.lizzy.rs Git - lua_async.git/commitdiff
Port to Lua 5.3.3
authorElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 6 Aug 2021 20:54:20 +0000 (22:54 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 6 Aug 2021 20:54:20 +0000 (22:54 +0200)
README.md
async_await.lua
immediates.lua
intervals.lua
promises.lua
timeouts.lua

index abaa7f27511819d5bbe44d7da91fbf24e3af1dea..b5928779ab5100ab6ec0c9e79c4b807152ceacc7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 # lua_async
-This project aims to provide an API similar to the Node.js Event loop - for Lua, fully written in Lua itself. It works with Lua 5.1, but will be ported to work with 5.3.3 in the future.
+This project aims to provide an API similar to the Node.js Event loop - for Lua, fully written in Lua itself. It is tested with Lua 5.1 and Lua 5.3.3, but should probably work with any Lua 5.x.
 Note that the goal is not to clone the Node Event loop exactly.
 This is already fully usable, but some features are missing (Events, EventTargets, some Promise methods) and will be implemented in the near future.
 It also provides a few useful extra methods as well as basic scheduling.
index 6965688a81bc9847606fcef1cc236297dc3b227d..280982df54fff3da03abdd8097cca3203c8568e9 100644 (file)
@@ -1,3 +1,5 @@
+local unpack = unpack or table.unpack
+
 function async(func)
        return function(...)
                local promise = Promise()
index 8913ddc05beefd01f3adc7f78829598fa457298b..3e378fd84619ac53c2106c1ab9504adf2a10ecf8 100644 (file)
@@ -1,3 +1,4 @@
+local unpack = unpack or table.unpack
 lua_async.immediates = {
        pool = {},
        executing = {},
index 2087fc14b577d94dd837f61d58d47cc922ad2feb..a635f34696962f0813a1d29614ce4297e7e709d4 100644 (file)
@@ -1,3 +1,4 @@
+local unpack = unpack or table.unpack
 lua_async.intervals = {
        pool = {},
        executing = {},
index 97cd20e6ae043904ed3b0e78b753b71a57361869..0ab61a6b20a459ca60850487d566b28f27e0a7a3 100644 (file)
@@ -1,3 +1,4 @@
+local unpack = unpack or table.unpack
 local PromisePrototype = {}
 
 function PromisePrototype:__run_handler(func, ...)
index 864889e30a52ffe9a8978627dec2100b26a46db0..7b7e71a4e8a7030a39e38814555f12bcdb78405c 100644 (file)
@@ -1,3 +1,4 @@
+local unpack = unpack or table.unpack
 lua_async.timeouts = {
        pool = {},
        executing = {},