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 buffer instead of sliding buffer and remove LinkedList #60

Merged
merged 3 commits into from
May 19, 2024

Conversation

jianghoy
Copy link
Contributor

Motivation

See #59. Basically, the use of LinkedList is not supported in babashka.

New Implementation

I switched to using a buffer instead of a sliding buffer, so now the buffer will not discard previous input, with the caveat that the streaming will be blocked when there's nothing on the other side of the channel taking streaming response out of the buffer (which I think is reasonable, if the consumer side cannot process fast enough then maybe they need to reconsider rather than just pile everything inside JVM heap). I also picked a arbitrarily large buffer size.

@wkok
Copy link
Owner

wkok commented May 19, 2024

Thank you!

@wkok wkok merged commit b6a0a28 into wkok:main May 19, 2024
@wkok wkok mentioned this pull request May 19, 2024
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