Replies: 3 comments 4 replies
-
FYI, there was exactly the same request on reactive-dotnet long time back, but was closed stating no valid reason for its closure. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Can you describe the use case? |
Beta Was this translation helpful? Give feedback.
1 reply
-
This is definitely possible, but will cause you to unsubscribe and resubscribe. If you had something like XHR requests, you could pause it. With these steps, you'll have to start over after changing the number of pipelines.
downloadInBatches$
.pipe(
switchMap(({
numberOfPipelines,
observables,
}) => (
of(observables)
.pipe(
mergeAll(
numberOfPipelines,
),
)
))
)
// start
downloadInBatches$
.next({
numberOfPipelines: 4,
observables: [obs1$, obs2$],
})
// change occurred
downloadInBatches$
.next({
numberOfPipelines: 2,
observables: (
[obs1$, obs2$]
.filter(({
isClosed,
}) => (
!isClosed
)),
}) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can some one please help with some pointers, insights into, how one can dynamically change the 'concurrent' parameter value to mergeMap operator ?
My use-case is to let the end-users, play with the number of concurrent API-Fetch calls to be made dynamically.. just as a typical download-manager would let a user dynamically change the number of concurrent downloads from a huge list of queued up download-links..
Beta Was this translation helpful? Give feedback.
All reactions