skip to Main Content

Swift DispatchQueue global and main in variable – Ios swift

I have 3 functions like this: func getMyFirstItem(complete: @escaping (Int) -> Void) { DispatchQueue.main.async { complete(10) } } func getMySecondtItem(complete: @escaping (Int) -> Void) { DispatchQueue.global(qos:.background).async { complete(10) } } func getMyThirdItem(complete: @escaping (Int) -> Void) { DispatchQueue.main.async { complete(10)…

VIEW QUESTION
Back To Top
Search