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

Use Fiber.schedule in Streamable. #68

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Sep 10, 2024

I'm unhappy that this was the only way to effectively implement this functionality, but I could not see any easy way to implement asynchronous flow control which is what is needed if invoking #each on a Streamable. The alternative is to simply fail. I tried implementing a bi-directional queue for handling input and output but it was extremely difficult to make it make sense in the context of both client and server behaviour, across HTTP/1 and HTTP/2+.

Therefore, using Fiber.schedule makes sense. However, I'm unhappy because it specifically introduces asynchronicity into a library which is supposed to be strictly sequential. It turns out implementing it sequentially is not worth the complexity.

Types of Changes

  • Bug fix.
  • New feature.

Contribution

@ioquatix ioquatix merged commit e7cd220 into main Sep 10, 2024
22 of 40 checks passed
@ioquatix ioquatix deleted the bidirectional-example-fixes branch September 10, 2024 22:35
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.

1 participant