mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
refactor: use new async code for runner and simplify task class
This commit is contained in:
parent
768de1ebf6
commit
765773a176
5 changed files with 133 additions and 205 deletions
|
@ -30,12 +30,11 @@ describe("runner", function()
|
|||
end,
|
||||
}
|
||||
package.loaded["lazy.manage.task.test"]["async" .. i] = {
|
||||
---@async
|
||||
---@param task LazyTask
|
||||
run = function(task)
|
||||
task:async(function()
|
||||
coroutine.yield()
|
||||
table.insert(runs, { plugin = task.plugin.name, task = task.name })
|
||||
end)
|
||||
coroutine.yield()
|
||||
table.insert(runs, { plugin = task.plugin.name, task = task.name })
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue