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

Buffer n emits #247

Open
pjarts opened this issue May 24, 2018 · 0 comments
Open

Buffer n emits #247

pjarts opened this issue May 24, 2018 · 0 comments

Comments

@pjarts
Copy link

pjarts commented May 24, 2018

I need to read items from one place and write them to another. Both read and write operations will handle batches of items but the batch size will differ depending on the operation, e.g. I read 100 items at a time but can only write 25. I figured I could use streams in order to easily perform these operations in parallel but I can't find any operator that seems to fit my needs. All buffering operators seem to use a separator stream to control emits. I'm looking for something more like pairwise, only it should take an argument that sets the size of the buffer and also emits the remainder if the source completes. There's probably a way to accomplish this by composing operators but all examples I've seen use interval based streams to control the buffer.

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

No branches or pull requests

1 participant