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
I'm seeing some strange behaviour with parallel when joining some forked streams and was just wondering if I'm missing something. Consider this trivial example:
It seems like only the first stream is used but if I use _.merge() all the streams are read and likewise if I create separate streams rather than forking them or even if I use observe() I get all the transformed elements back.
Is this somehow related to #40 ? And also, given that _.merge() works in parallel too and in this case I don't particularly care about the order of the elements, should I just be using that?
The text was updated successfully, but these errors were encountered:
This is definitely a bug in parallel. All streams should be consumed, since you have a parallelism factor of three, so it's not an issue of one stream holding up the rest.
I suspect it has to do with the shift without flushing the buffer here, which only shows up with synchronous forks because of how well-coordinated the resulting streams are.
In any case, you only need to use parallel if you care about the stream order or you care about limiting the level of parallelism. Otherwise, merge is better, since it doesn't buffer anything.
I'm seeing some strange behaviour with
parallel
when joining some forked streams and was just wondering if I'm missing something. Consider this trivial example:It seems like only the first stream is used but if I use
_.merge()
all the streams are read and likewise if I create separate streams rather than forking them or even if I useobserve()
I get all the transformed elements back.Is this somehow related to #40 ? And also, given that
_.merge()
works in parallel too and in this case I don't particularly care about the order of the elements, should I just be using that?The text was updated successfully, but these errors were encountered: