Vote count:
0
I very commonly write code following this pattern:
- (void)doLongTaskAsync:(CompletionBlock)completion
{
dispatch_async(backgroundQueue, ^{
// Do Long Running Calculation
dispatch_async(dispatch_get_main_queue(), ^{
completion();
});
});
}
If dispatch_get_main_queue is depreciated, what is the replacement for this style of code? Is NSOperationQueue now the only means to thread code?
asked 35 secs ago
Aucun commentaire:
Enregistrer un commentaire