serialize timer updates to prevent cold dispatch collisions

This commit is contained in:
Kyle Hedden 2023-08-09 16:37:03 -04:00
parent 3ad04abfed
commit e7f21b980f

View File

@ -562,7 +562,9 @@ extension NotificationOperation {
guard isExecuting, guard isExecuting,
!isCancelled else { return } !isCancelled else { return }
self.log(message: "Operation Updated") self.log(message: "Operation Updated")
updateStopTimer() displayableQueue.async(flags: .barrier) { [self] in
updateStopTimer()
}
Task { Task {
await transitionDelegate.update(with: notificationModel, delegateObject: delegateObject) await transitionDelegate.update(with: notificationModel, delegateObject: delegateObject)
NotificationHandler.shared()?.onNotificationUpdated.send((notification, notificationModel)) NotificationHandler.shared()?.onNotificationUpdated.send((notification, notificationModel))