swift 3.0中的dispatch_group_async函数

时间:2016-09-18 19:16:20

标签: swift swift3

我的问题是如何在Swift 3中正确翻译此功能,因为我注意到有很多关于<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <table> <tr id="section_tr_intbody" class="together"> <td>Table cell stuff</td> </tr> <tr id="section_tr_intbodyagain" class="nottogether"> <td>More table cell stuff</td> </tr> <tr id="section_tr_intbodystill" class="together"> <td>Even more table cell stuff</td> </tr> </table> <div class="Slider slideup"> <div id="Actual" class="together"> Div stuff </div> <div id="fake" class="nottogether"> more Div Stuff </div> <div id="random" class="together"> Even more Div Stuff </div> </div>的文档,但没有关于dispatch_async

的任何内容
dispatch_group_async

1 个答案:

答案 0 :(得分:12)

试试这个:

let group = DispatchGroup()

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