Dispatch_group_async function in swift 3.0

My question is how to properly translate this function in Swift 3, because I noticed that there is a lot of documentation about dispatch_async, but there is nothing aboutdispatch_group_async

dispatch_group_async(group, dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) { [unowned self] in
+4
source share
1 answer

Try the following:

let group = DispatchGroup()

DispatchQueue.global(qos: .userInitiated)
    .async(group:group) { [unowned self] in
        // code
    }
+9
source

Source: https://habr.com/ru/post/1654999/


All Articles