Skip to content

Added f.cede for async boundry on empty stream#3713

Open
ankitkumarrain wants to merge 7 commits intotypelevel:mainfrom
ankitkumarrain:bug-3697
Open

Added f.cede for async boundry on empty stream#3713
ankitkumarrain wants to merge 7 commits intotypelevel:mainfrom
ankitkumarrain:bug-3697

Conversation

@ankitkumarrain
Copy link
Copy Markdown

@ankitkumarrain ankitkumarrain commented Apr 9, 2026

Issue Number -#3697

I modified documentation of the merge combinator. I added f.cede for async boundry and filter empty chunks to avoid unnecessary sendchunk calls.

@ankitkumarrain
Copy link
Copy Markdown
Author

Hey @armanbilge and @mpilquist Please review this code , when you have time .

Copy link
Copy Markdown
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Please add a test related to the linked issue.

@ankitkumarrain
Copy link
Copy Markdown
Author

Hi @armanbilge I have added test for the linked issue with a .ignore mark to skip test. Because it actaully did not made a fix to the issue.
After a deep digging in , Stream.merge.repeat hangs because stream.merge.repeat internally creates an infinite chain of bind (Succeeded(()),k) nodes. The viewl function on pull.scala is a @tailrac loop that handles bind (treminal,count) by immediately recursing, It has no IO boundry in between . This pointed me the fiber running in the stream.empty.repeat is struck in a pure JVM loop forever.
Well, About my changes i have added filter(.non Empty) change in merge combinator that avoids unnecessary sendChunk calls for empty chunks in the merge path.
I was looking for preffered approach for the fix in the right direction . Can you please help me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants