We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ccaac1 commit bb83679Copy full SHA for bb83679
lua/async.lua
@@ -3,7 +3,7 @@
3
--#################### ############ ####################
4
5
local co = coroutine
6
-
+local unpack = table.unpack or unpack
7
8
-- use with wrap
9
local pong = function (func, callback)
@@ -17,7 +17,7 @@ local pong = function (func, callback)
17
assert(status, ret)
18
if co.status(thread) == "dead" then
19
if (callback) then
20
- (function (_, ...) callback(...) end)(table.unpack(pack))
+ (function (_, ...) callback(...) end)(unpack(pack))
21
end
22
else
23
assert(type(ret) == "function", "type error :: expected func - coroutine yielded some value")
0 commit comments