Skip to content

Use _final instead of _flush#6

Open
Tapppi wants to merge 1 commit intomafintosh:masterfrom
Tapppi:flush-to-final
Open

Use _final instead of _flush#6
Tapppi wants to merge 1 commit intomafintosh:masterfrom
Tapppi:flush-to-final

Conversation

@Tapppi
Copy link
Copy Markdown

@Tapppi Tapppi commented Jul 19, 2018

Now that node 8 and readable-stream include the _final method, we should use that when closing down instead of _flush to make sure all processing is done before 'finish' event fires.

The only change should be that the Writable side of the transform does not close after everything has been passed to transform function but after everything has been processed, as should happen according to node docs.

Fixes #4

@jomaora
Copy link
Copy Markdown

jomaora commented Aug 8, 2018

Any news about this fix?

@Tapppi
Copy link
Copy Markdown
Author

Tapppi commented Aug 10, 2018

@jomaora waiting for feedback from @mafintosh

piglovesyou added a commit to piglovesyou/pipeline-pipe that referenced this pull request Sep 29, 2019
…i-flush-to-final

I respectfully merged Tapppi/parallel-transform/tree/flush-to-final

Refs. mafintosh#4
Refs. mafintosh#6

# Conflicts:
#	index.js
#	package.json
@piglovesyou
Copy link
Copy Markdown

piglovesyou commented Sep 29, 2019

I respectfully merged this into my public package @piglovesyou/parallel-transform. I put some tests and it works very well even in require('stream').pipeline, emitting callback after all buffers are consumed. I appreciate your work, @Tapppi .

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.

Emits finish dispite still consuming

4 participants