mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
fix(async): make asyncs abortable
This commit is contained in:
parent
c882227f1f
commit
1fad61712b
7 changed files with 29 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
--# selene:allow(incorrect_standard_library_use)
|
||||
local Async = require("lazy.async")
|
||||
local Task = require("lazy.manage.task")
|
||||
|
||||
describe("task", function()
|
||||
|
@ -42,7 +43,7 @@ describe("task", function()
|
|||
local running = true
|
||||
---@async
|
||||
local task = Task.new(plugin, "test", function()
|
||||
coroutine.yield()
|
||||
Async.yield()
|
||||
running = false
|
||||
end, opts)
|
||||
assert(task:running())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue