Skip to content
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

Ember stream forking #4244

merged 15 commits into from Jan 28, 2021


Copy link

@RaasAhsan RaasAhsan commented Jan 23, 2021

Follow up to #4179. I introduced a prefetch call which is a hack to get the outer stream to terminate and finalize before inner streams do, by buffering streams to a new stream. parJoin also shuffles the results of the inner stream back out to the new stream which isn't strictly necessary.

This PR introduces a forking combinator which behaves identically to parJoin except the outer stream can terminate and finalize before the inner stream, and there is no queueing involved.


  • Concurrency control
  • Possibly upstream this back into fs2, since it's useful for network servers in general

@rossabaker rossabaker added this to To do in Cats Effect 3 via automation Jan 24, 2021
@RaasAhsan RaasAhsan marked this pull request as ready for review January 24, 2021 07:31
Copy link
Member Author

@rossabaker if you encounter any issues merging downstream, definitely ping me to help, but I don't anticipate there being any trouble

@RaasAhsan RaasAhsan changed the base branch from main to series/0.21 January 27, 2021 03:13
Copy link

@ChristopherDavenport ChristopherDavenport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can contribute this to fs2?

Copy link

We can contribute this to fs2?

it's extremely dangerous in the general case :)

@rossabaker rossabaker merged commit c04dadf into http4s:series/0.21 Jan 28, 2021
Cats Effect 3 automation moved this from To do to Done Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No open projects

Successfully merging this pull request may close these issues.

None yet

4 participants