-
-
Save stigi/3f539a92352ec0e24110 to your computer and use it in GitHub Desktop.
RACSignal from RACCommand is not subscribed to by `-waitUntilCompleted:`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[[RACSignal return:@"returnValue"] logAll] waitUntilCompleted:nil]; | |
NSLog(@"Done waiting for return"); | |
RACCommand *c = [[RACCommand alloc] initWithSignalBlock:^RACSignal *(id _) { | |
NSLog(@"Execute command"); | |
return [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) { | |
NSLog(@"Command Signal subscribed"); | |
[subscriber sendNext:@"commandValue"]; | |
[subscriber sendCompleted]; | |
return nil; | |
}]; | |
}]; | |
[[[c execute:nil] logAll] waitUntilCompleted:nil]; | |
NSLog(@"Done waiting for command"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-08-19 12:41:04.072 RACPlayground[47616:60b] <RACReturnSignal: 0x8f9ed30> name: next: returnValue | |
2014-08-19 12:41:04.073 RACPlayground[47616:60b] <RACDynamicSignal: 0x8fbf730> name: completed | |
2014-08-19 12:41:04.074 RACPlayground[47616:60b] Done waiting for return | |
2014-08-19 12:41:04.080 RACPlayground[47616:60b] Execute command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment