Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Sources/OpenSwiftUICore/Graph/GraphHost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -426,17 +426,21 @@ extension GraphHost {
package final func emptyTransaction(_ transaction: Transaction = .init()) {
asyncTransaction(transaction, mutation: EmptyGraphMutation())
}


// Audited for 6.5.4
package final func continueTransaction(_ body: @escaping () -> Void) {
Update.assertIsLocked()
var host = self
while !host.inTransaction {
guard let parent = host.parentHost else {
Update.enqueueAction(body)
Update.enqueueAction(reason: nil) {
host.asyncTransaction { body() }
}
return
}
host = parent
}
// TODO: CustomEventTrace
host.continuations.append(body)
}

Expand Down
Loading