-
Notifications
You must be signed in to change notification settings - Fork 496
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
Add async wait methods that support custom timeout #98
Conversation
These failures doesn't seem to be related to changes so not sure if there is anything I can do about them? |
ReactiveObjC/RACSignal.h
Outdated
@@ -461,6 +461,8 @@ typedef RACSignal * _Nullable (^RACSignalBindBlock)(ValueType _Nullable value, B | |||
/// | |||
/// Returns the first value received, or `defaultValue` if no value is received | |||
/// before the signal finishes or the method times out. | |||
- (nullable ValueType)asynchronousFirstOrDefault:(nullable ValueType)defaultValue success:(nullable BOOL *)success error:(NSError * _Nullable * _Nullable)error timeout:(NSTimeInterval)timeout; | |||
|
|||
- (nullable ValueType)asynchronousFirstOrDefault:(nullable ValueType)defaultValue success:(nullable BOOL *)success error:(NSError * _Nullable * _Nullable)error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add documentation comments to this methods? (the same as before is probably fine)
ReactiveObjC/RACSignal.h
Outdated
@@ -472,6 +474,8 @@ typedef RACSignal * _Nullable (^RACSignalBindBlock)(ValueType _Nullable value, B | |||
/// | |||
/// Returns whether the signal completed successfully before timing out. If NO, | |||
/// `error` will be set to any error that occurred. | |||
- (BOOL)asynchronouslyWaitUntilCompleted:(NSError * _Nullable * _Nullable)error timeout:(NSTimeInterval)timeout; | |||
|
|||
- (BOOL)asynchronouslyWaitUntilCompleted:(NSError * _Nullable * _Nullable)error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add documentation comments to this methods? (the same as before is probably fine)
ReactiveObjC/RACSignal.h
Outdated
@@ -461,6 +461,8 @@ typedef RACSignal * _Nullable (^RACSignalBindBlock)(ValueType _Nullable value, B | |||
/// | |||
/// Returns the first value received, or `defaultValue` if no value is received | |||
/// before the signal finishes or the method times out. | |||
- (nullable ValueType)asynchronousFirstOrDefault:(nullable ValueType)defaultValue success:(nullable BOOL *)success error:(NSError * _Nullable * _Nullable)error timeout:(NSTimeInterval)timeout; | |||
|
|||
- (nullable ValueType)asynchronousFirstOrDefault:(nullable ValueType)defaultValue success:(nullable BOOL *)success error:(NSError * _Nullable * _Nullable)error; | |||
|
|||
/// Spins the main run loop for a short while, waiting for the receiver to complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this documentation comment to mention the provided timeout, e.g. "Spins the main run loop for a short while, waiting for the receiver to complete or the provided timeout to elapse."
ReactiveObjC/RACSignal.h
Outdated
@@ -461,6 +461,8 @@ typedef RACSignal * _Nullable (^RACSignalBindBlock)(ValueType _Nullable value, B | |||
/// | |||
/// Returns the first value received, or `defaultValue` if no value is received | |||
/// before the signal finishes or the method times out. | |||
- (nullable ValueType)asynchronousFirstOrDefault:(nullable ValueType)defaultValue success:(nullable BOOL *)success error:(NSError * _Nullable * _Nullable)error timeout:(NSTimeInterval)timeout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this method's documentation comment to mention the provided timeout, e.g. "Spins the main run loop for a short while, waiting for the receiver to send a next
or the provided timeout to elapse."
Just a few comments about the documentation comments—thanks for the contribution! |
Cool, should be ready now I think |
ReactiveObjC/RACSignal.h
Outdated
- (BOOL)asynchronouslyWaitUntilCompleted:(NSError * _Nullable * _Nullable)error timeout:(NSTimeInterval)timeout; | ||
|
||
/// Spins the main run loop for a short while, waiting for the receiver to complete | ||
/// or the provided timeout to elapse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this doc comment is for the wrong method—this method asynchronouslyWaitUntilCompleted:
does not take "a provided timeout"—rather the one above this asynchronouslyWaitUntilCompleted:timeout:
does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right ... should be fixed now.
Add async wait methods that support custom timeout
This resolves #95