It is said that :
GCD lets us create groups, which allow you to place your tasks in one place, run all of them, and get a notification at the end from GCD. Those group blocks of code together ensure that all of them get executed by GCD one by one, as dependencies of one another.
As those blocks are getting executed one by one, then technically GCD function for dispatch_group should be dispatch_group_sync not dispatch_group_async.
Thanks in advance for great explanation.
Because here async is relative to the thread(Common main tread) that the block is submitted.
You do not need to sync groups to that thread,you just add code to that thread,code is executed one by one.
Besides,with dispatch group.
DISPATCH_QUEUE_SERIAL).DISPATCH_QUEUE_CONCURRENT).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With