fix(async): make asyncs abortable

This commit is contained in:
Folke Lemaitre 2024-06-30 13:35:11 +02:00
parent c882227f1f
commit 1fad61712b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 29 additions and 8 deletions

View file

@ -1,3 +1,4 @@
local Async = require("lazy.async")
local Runner = require("lazy.manage.runner")
describe("runner", function()
@ -33,7 +34,7 @@ describe("runner", function()
---@async
---@param task LazyTask
run = function(task)
coroutine.yield()
Async.yield()
table.insert(runs, { plugin = task.plugin.name, task = task.name })
end,
}