Skip to content

Embedded ConcurrentOperations not works #2

@nordringrayhide

Description

@nordringrayhide

For example it'll never be done. It's stops with "A has been started" message. Please help me

- (void)abcde {
    NSOperationQueue *queue = [[NSOperationQueue alloc] init];

    NSOperation *a = [RNConcurrentBlockOperation operationWithBlock: ^(RNCompletionBlock completion) {
        NSLog(@"A has been started");

        NSOperationQueue *localQueue = [[NSOperationQueue alloc] init];
        NSOperation *b = [RNConcurrentBlockOperation operationWithBlock: ^(RNCompletionBlock completion) {
            NSLog(@"B has been done");
            completion(nil);
        }];
        [localQueue addOperation:b];
        [localQueue waitUntilAllOperationsAreFinished];

        NSLog(@"A has been finished");
        completion(nil);
    }];

    [queue addOperation:a];
}

Any idea of manage embedded concurrent async tasks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions