You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SwiftExampleApp: run ContractDownloader's contract fetch off the main actor (download, preview, refresh) #6068
ContractDownloader is @MainActor. All three of its paths call one synchronous fetchContract, which runs dash_sdk_data_contract_fetch_with_serialization, and that blocks on the network inside the FFI:
On a slow or offline connection, rendering and input stop until the fetch returns.
Proposal
Make the fetch nonisolated: keep the SDK alive for the background call, copy and free the Rust buffers off the main actor, and hand owned data back to the main actor for the SwiftData writes. Move all three paths together so they stay consistent.
Context
Raised in review of #6053 and deferred there (thepastaclaw thread on ContractDownloader.swift).
Activity