-
Notifications
You must be signed in to change notification settings - Fork 429
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
[Idea] Add FlattenStrategy.throttle
#549
Comments
Sorry, actually this is not |
It seems throttle is the best fit verb for this, just that it throttles by progress rather than a minimum time interval. |
Right, |
FlattenStrategy.raceContinuous
FlattenStrategy.throttle
This seems conceptually similar to Maybe this? public static func queue(limit: UInt) -> FlattenStrategy { … } |
@mdiep public static func concurrent(limit: UInt, queueCount: UInt) -> FlattenStrategy so that more flexible flattening e.g. |
Hello. 👋 Thanks for opening this issue. Due to inactivity, we will soft close the issue. If you feel that it should remain open, please let us know. 😄 |
Related to
FlattenStrategy.race
implemented in #233, I thought it will be useful to haveFlattenStrategy.raceContinuous
(orcase race(continuous: Bool)
)FlattenStrategy.throttle
as well.In theory, this will work similar to
.flatMap(.merge) { someAPIAction.apply($0) }
but omittingAction
which may sometimes become too verbose to declare (if we aren't interested inenabledIf
,isExecuting
, etc).Use case
Example: Loading next API after scrollView reached bottom
The text was updated successfully, but these errors were encountered: