main thread operation init which creates background task

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent 6aee5d5390
commit d57cbf2acd

@ -81,10 +81,10 @@ NS_ASSUME_NONNULL_BEGIN
success:(void (^)(NSSet<SignalRecipient *> *recipients))success success:(void (^)(NSSet<SignalRecipient *> *recipients))success
failure:(void (^)(NSError *error))failure failure:(void (^)(NSError *error))failure
{ {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ OWSLegacyContactDiscoveryOperation *operation =
OWSLegacyContactDiscoveryOperation *operation = [[OWSLegacyContactDiscoveryOperation alloc] initWithRecipientIdsToLookup:recipientIdsToLookup.allObjects];
[[OWSLegacyContactDiscoveryOperation alloc] initWithRecipientIdsToLookup:recipientIdsToLookup.allObjects];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSArray<NSOperation *> *operationAndDependencies = [operation.dependencies arrayByAddingObject:operation]; NSArray<NSOperation *> *operationAndDependencies = [operation.dependencies arrayByAddingObject:operation];
[self.contactIntersectionQueue addOperations:operationAndDependencies waitUntilFinished:YES]; [self.contactIntersectionQueue addOperations:operationAndDependencies waitUntilFinished:YES];

Loading…
Cancel
Save