All depend from your code and quantity of recursion. But in any case, you can do something like this:
void (^doSomething)(NSArray *numbers);
doSomething = ^void(NSArray *numbers){
// ... bla bla
if (condition) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ull), ^{
doSomething(numbers);
});
}
};
in this case you launch again the block but due the fact that you are using dispatch_async
, the outer block return and the new block continue separately in the concurrent queue.