Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded ConcurrentOperations not works #2

Open
nordringrayhide opened this issue Dec 21, 2014 · 1 comment
Open

Embedded ConcurrentOperations not works #2

nordringrayhide opened this issue Dec 21, 2014 · 1 comment

Comments

@nordringrayhide
Copy link

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?

@nobre84
Copy link
Owner

nobre84 commented Dec 25, 2014

Hey I'll take a look at this tonight and let you know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants