This commit is contained in:
giuseppenuc committed 2016-04-01 19:20:23 +02:00
1 parent b0bcfad332
commit de4cd554f0
104 files changed
+2211 -1744

No files matched your search

+20
View File
@@ -29,6 +29,18 @@ extern NSInteger const kBFMultipleErrorsError;
*/
extern NSString *const BFTaskMultipleExceptionsException;
/*!
An error userInfo key used if there were multiple errors on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSError *> *`.
*/
extern NSString *const BFTaskMultipleErrorsUserInfoKey;
/*!
An error userInfo key used if there were multiple exceptions on <BFTask taskForCompletionOfAllTasks:>.
Value type is `NSArray<NSException *> *`.
*/
extern NSString *const BFTaskMultipleExceptionsUserInfoKey;
@class BFExecutor;
@class BFTask;
@@ -82,6 +94,14 @@ typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
*/
+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray<BFTask *> *)tasks;
/*!
Returns a task that will be completed once there is at least one successful task.
The first task to successuly complete will set the result, all other tasks results are
ignored.
@param tasks An `NSArray` of the tasks to use as an input.
*/
+ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<BFTask *> *)tasks;
/*!
Returns a task that will be completed a certain amount of time in the future.
@param millis The approximate number of milliseconds to wait before the