I'm trying to understand concurrency and can't figure out why this is the escaping closure is not being called.
var closure: (() -> ()) = {
defer { print("inner") }
}
func outer(asyncClosure: @escaping (() -> ())) {
defer { print("outer") }
DispatchQueue.main.async { asyncClosure() }
}
outer(asyncClosure: closure)
// output is "outer" only
Why is my escaping closure not being called? It's an async function on the main queue and is not blocking anything.