queue

DispatchQueue

label

"weather_io_queue"

func

load

()

// Mimic 1 sec delay.

queue

asyncAfter

deadline

now

()

weak

self

in

DispatchQueue

main

async

self

result

sunny

Finally, display the results:

struct

ContentView

View

@StateObject

var

viewModel

ContentViewModel

()

var

body

some

View

Text