Skip to content

Commit

Permalink
fix: I think this should prevent on_exit callbacks from erroring
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdevries committed Sep 17, 2020
1 parent 7a178b8 commit 3ee90ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lua/plenary/neorocks/scheduler.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
local Job = require('plenary.job')

local scheduler = {}

function scheduler:new()
Expand Down Expand Up @@ -36,9 +34,9 @@ function scheduler:_run_item(item)
end

function scheduler:_chain_item(item)
self.items[#self.items - 1]:add_on_exit_callback(function()
self.items[#self.items - 1]:add_on_exit_callback(vim.schedule_wrap(function()
self:_run_item(item)
end)
end))
end

return scheduler

0 comments on commit 3ee90ef

Please sign in to comment.