You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use this module with async work, but if all emits are async this breaks down. Added a failing test to show the behaviour I mean.
This fails with
# through async
not ok 3 should be equivalent
---
operator: deepEqual
expected: [ 10, 20, 30 ]
actual: []
at: pull (/Users/dignifiedquire/opensource/pull-through/index.js:46:22)
...
I'm not sure how far this is related with the Don't keep a reference to this, but I'm not seeing another way except for keeping a reference inside the writer when doing async work.
I mainly wrote this module to make porting a few other through node-stream modules easy.
one solution might be to make a pull-through2 which takes a callback?
can you describe the stream you are trying to implement?
you could prehaps also use asyncMap, and then flatten?
one solution might be to make a pull-through2 which takes a callback?
Yes that might be a possible solution. Maybe for now we just add note to the readme that this case is not working and asyncMap can be an alternative in those cases?
you could prehaps also use asyncMap, and then flatten?
Yes this is exactly what I ended up doing, switching to use asyncMap, as in my case I actually had a 1-1 mapping between in and out data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been trying to use this module with async work, but if all emits are async this breaks down. Added a failing test to show the behaviour I mean.
This fails with