Mulithreading: executing method calls only after finished executing other method

后端 未结 2 1838
春和景丽
春和景丽 2021-02-04 20:53

I am trying to process method asynchronously, as per requirements, once the first method has completed, only then the second method should start executing. The Problem is first

2条回答
  •  被撕碎了的回忆
    2021-02-04 21:36

    Dispatch a Single Queue and call your Methods in order

    dispatch_group_async(group, queue, ^{
    
                [self firstMethod];
                NSLog(@"firstMethod Done");
               [self secondmethod];
    
            });
    

    Or you might dispatch a group of 3 concurrent queues(This is a Wild guess)

提交回复
热议问题