You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you do
[OMPromise any:@[A, B, C]];
and e.g. B is fulfilled.
Wouldn't it be cool to cancel A and C.
It's not a big deal, but users may expect such behavior, special when there is a cancel method on promises.
Same is true for progress. If we have an any concatenation, we are done (100% progress) when any of the promises is fulfilled.
The text was updated successfully, but these errors were encountered:
I don't think that should be the default behavior. Some people might use one of your combined promises A, B or C also in another context and they would be surprised if it gets canceled.
But we could add a second version of this combinator which adds the option to cancel all remaining promises, something like - any:(NSArray *)promises cancel:(BOOL)cancel;. I think that would be a good addition.
In this context it might also make sense to add a similar addition for the all: combinator, which cancels all other promises in case one fails.
When you do
[OMPromise any:@[A, B, C]];
and e.g. B is fulfilled.
Wouldn't it be cool to cancel A and C.
It's not a big deal, but users may expect such behavior, special when there is a cancel method on promises.
Same is true for progress. If we have an any concatenation, we are done (100% progress) when any of the promises is fulfilled.
The text was updated successfully, but these errors were encountered: