Is there anyway in swift's new structured concurrency model to do the following without a dummy bool return?
func do() async -> Bool {
something()
return true
}
async let foo = do()
//do other stuff
stuff()
//now I need to know that "do" has finished
await foo
I know that I can do the following but it will not run concurrently:
func do() async {
something()
}
await do()
stuff()
//cannot run "stuff" and "do" concurrently
I feel like I am missing a basic idea here because the top block of code does what I need but feels like a hack due to the Bool return.