var a = 0
var b = 0
let group = DispatchGroup()
group.enter()
DispatchQueue.main.async {
FireStore.getDocument("Users", "") { (doc, v) in
a = 1
group.leave()
}
}
group.enter()
DispatchQueue.main.async {
FireStore.getDocument("Users", "") { (doc, v) in
b = 1
group.leave()
}
}
group.notify(queue: .main) {
print("a = ", a)
print("b = ", b)
}