pipe() allow destroying source! #55010
Labels
feature request
Issues that request new features to be added to Node.js.
stream
Issues and PRs related to the stream subsystem.
What is the problem this feature will solve?
node 20.15.1. The idea is to pass around a stream without having to track the sources and being able to destroy it. So the transformer kinda starts owning control of end of life of it's source. Example use case: Implemet tail -f and abort after 5 lines. Then reading bytes is the source, and turning into lines is a transformer. The consumer (who wants to find a mysqld ready for connections in the log) should not care about the tail -f implementation.
should destroy the source, too.
This doesn't happen.
complete test case
What is the feature you are proposing to solve the problem?
What alternatives have you considered?
using this code instead:
The text was updated successfully, but these errors were encountered: