Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@luis3m
Copy link
Contributor

@luis3m luis3m commented May 5, 2020

As discussed on Discord, add termination strategies for ZStream#merge.

  • mergeTerminateLeft: given stream A and B, new produced stream C will terminate as soon as A terminates
  • mergeTerminateRight: given stream A and B, new produced stream C will terminate as soon as B terminates
  • mergeTerminateEither: given stream A and B, new produced stream C will terminate as soon as either A or B terminate
  • merge with no strategy specified: current behavior, given stream A and B, new produced stream C will terminate when both A and B terminate

@luis3m luis3m requested a review from iravid as a code owner May 5, 2020 22:31
@CLAassistant
Copy link

CLAassistant commented May 5, 2020

CLA assistant check
All committers have signed the CLA.

@luis3m luis3m force-pushed the merge-termination branch from 754dce8 to 5208131 Compare May 5, 2020 22:39
@iravid
Copy link
Member

iravid commented May 7, 2020

@luis3m Thanks, the approach looks great! Nice work! Can you check why the tests are flaky?

@luis3m
Copy link
Contributor Author

luis3m commented May 8, 2020

@iravid thanks, these tests are also passing on top of #3424

@iravid
Copy link
Member

iravid commented May 9, 2020

That's great @luis3m. So will merge this as soon as the TestClock changes are in.

@iravid iravid added the stream ZIO Stream label May 10, 2020
@luis3m luis3m force-pushed the merge-termination branch from 5208131 to ffb415f Compare May 13, 2020 17:06
@luis3m
Copy link
Contributor Author

luis3m commented May 13, 2020

@iravid just rebased on top of #3424 as well. The only failure seems to be unrelated 🤔

Copy link
Member

@iravid iravid left a comment

Choose a reason for hiding this comment

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

Great addition! 💪🏻

@iravid iravid merged commit cf8af9f into zio:master May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stream ZIO Stream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants