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

Simplify #24

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft

Simplify #24

wants to merge 26 commits into from

Conversation

back2dos
Copy link
Member

This is still missing quite a few things (implicit casts and regrouping), but it vastly improves performance for synchronous streams and fixes #20 in the process.

It also makes stream iteration consistently lazy and suspendable.

Which brings me to my main question: what to do with blending? I don't fully understand the use case. It introduces a temporal component that can only be conserved if the blended stream is eager. The only usage I found was tink_websocket, to blend in the pongs in the TcpConnector, but I wonder if there are others.

@kevinresol
Copy link
Member

The only usage I found was tink_websocket

That's the only case I remember using it too. It was for automatically chipping in ping-pong messages to keep the connection alive. I guess we can just remove it and let high-level code handle these.

@kevinresol
Copy link
Member

How about let us merge this and deal with downstream usage later?

@back2dos
Copy link
Member Author

Actually, tink_io seems quite deeply affected by this. Need to resolve at least #27 to move forward.

@kevinresol
Copy link
Member

About websocket blend stream, the idea was that the incoming stream which can contain both signalling messages (ping/pong) and user messages is split into two streams respectively. For the signalling stream it is supposed to be handled internally by the framework i.e. auto ping pong. While the user message stream is passed to developer.

In this particular use case, the blended stream is actually eager because it is eagerly consumed and piped into the wire.

I guess we can live without blended stream, by simply consuming the two streams individually?

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.

Recursiveness and php
2 participants