From 01a979e22a35e7e1118c866806bf9269dcff55ac Mon Sep 17 00:00:00 2001 From: Allen Faure Date: Wed, 11 Sep 2024 19:29:02 -0500 Subject: [PATCH] improvements to background tasks --- WeakAuras/WeakAuras.lua | 3 ++- WeakAurasOptions/WeakAurasOptions.lua | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 3726fb8d52..36a910291f 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -4420,7 +4420,8 @@ do ok, val1, val2 = coroutine.resume(threadData.thread) if not ok then geterrorhandler()(val1 .. '\n' .. debugstack(threadData.thread)) - elseif coroutine.status(threadData.thread) ~= "dead" then + end + if coroutine.status(threadData.thread) ~= "dead" then estimates[name] = type(val1) == "number" and val1 or defaultEstimate local sequence = val2 or "" --[[@as string]] threadData.sequence[sequence] = (threadData.sequence[sequence] or 0) + 1 diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua index 07218a138f..5578b7b76a 100644 --- a/WeakAurasOptions/WeakAurasOptions.lua +++ b/WeakAurasOptions/WeakAurasOptions.lua @@ -726,9 +726,11 @@ local function LayoutDisplayButtons(msg) for id, button in pairs(displayButtons) do if OptionsPrivate.Private.loaded[id] then button:PriorityShow(1); + coroutine.yield() end end OptionsPrivate.Private.OptionsFrame().loadedButton:RecheckVisibility() + coroutine.yield() end OptionsPrivate.Private.ResumeAllDynamicGroups(suspended)