Say, I have a do-catch block inside a DispatchQueue.global().async
, so the block would executed on a global thread asynchronous.
func aFunc() {
DispatchQueue.global().async {
do {
try self.doSomething()
}
catch {
print(error)
}
}
}
If I remove DispatchQueue.global().async
block, how will this do-catch block working?
func aFunc() {
do {
try self.doSomething()
}
catch {
print(error)
}
}
1