Skip to content

Instantly share code, notes, and snippets.

@SebastianBoldt
Created February 4, 2022 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SebastianBoldt/4581549cec20ad746f5a145ffdda2769 to your computer and use it in GitHub Desktop.
Save SebastianBoldt/4581549cec20ad746f5a145ffdda2769 to your computer and use it in GitHub Desktop.
func loadData() async -> Data {
return Data()
}
func refreshUI(with data: Data) async {
let data = await loadData()
await MainActor.run {
view.update(with: data)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment