aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/async
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2026-05-22 20:14:45 +0200
committerGitHub <noreply@github.com>2026-05-22 20:14:45 +0200
commit24e77d5289db0f7b6f4b405683047315b66dc75b (patch)
tree1d40c97d129c8d621d9c9d0645c7c268b49505b2 /lua/mason-core/async
parentfeat(registry): add registry_cache setting for controlling cache behaviour (#... (diff)
downloadmason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar
mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.gz
mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.bz2
mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.lz
mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.xz
mason-24e77d5289db0f7b6f4b405683047315b66dc75b.tar.zst
mason-24e77d5289db0f7b6f4b405683047315b66dc75b.zip
feat: add support for socket.dev firewall client (#2088)
Diffstat (limited to 'lua/mason-core/async')
-rw-r--r--lua/mason-core/async/init.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/mason-core/async/init.lua b/lua/mason-core/async/init.lua
index 03963264..e3a2e850 100644
--- a/lua/mason-core/async/init.lua
+++ b/lua/mason-core/async/init.lua
@@ -78,7 +78,8 @@ local function new_execution_context(suspend_fn, callback, ...)
if cancelled or not thread then
return
end
- local ok, promise_or_result = co.resume(thread, ...)
+ local results = { co.resume(thread, ...) }
+ local ok, promise_or_result = results[1], results[2]
if cancelled or not thread then
return
end
@@ -88,7 +89,7 @@ local function new_execution_context(suspend_fn, callback, ...)
promise_or_result(step)
else
-- yield to parent coroutine
- step(coroutine.yield(promise_or_result))
+ step(coroutine.yield(promise_or_result, unpack(results, 3)))
end
else
callback(true, promise_or_result)