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

add asynchronous implementation #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kemitchell
Copy link
Contributor

This PR adds an implementation of pull-next that takes an asynchronous Source generator.

I was inspired to write this by a need to stream a succession of Node.js API HTTP response streams.

I do have one additional question: Might we use setImmediate(more) instead of setTimeout(more, 100)? Why 100ms?

@dominictarr
Copy link
Member

thanks - but instead of building in another path to use this particular module, it would be more the pull-stream way to keep this module the same, but write another module that lets you start a stream async.

you can that with https://github.com/pull-stream/pull-defer ... but prehaps it could be more obvious?

@dominictarr
Copy link
Member

this was refactored out of patchbay, and 100 ms seemed reasonable in that context, we should definitely change that

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