From e7f21b980fd3f022226df0d1bd9260c61febcb69 Mon Sep 17 00:00:00 2001 From: Kyle Hedden Date: Wed, 9 Aug 2023 16:37:03 -0400 Subject: [PATCH] serialize timer updates to prevent cold dispatch collisions --- MVMCoreUI/Notification/NotificationHandler.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Notification/NotificationHandler.swift b/MVMCoreUI/Notification/NotificationHandler.swift index ff9d90ad..c1e064d7 100644 --- a/MVMCoreUI/Notification/NotificationHandler.swift +++ b/MVMCoreUI/Notification/NotificationHandler.swift @@ -562,7 +562,9 @@ extension NotificationOperation { guard isExecuting, !isCancelled else { return } self.log(message: "Operation Updated") - updateStopTimer() + displayableQueue.async(flags: .barrier) { [self] in + updateStopTimer() + } Task { await transitionDelegate.update(with: notificationModel, delegateObject: delegateObject) NotificationHandler.shared()?.onNotificationUpdated.send((notification, notificationModel))