Uh oh!
There was an error while loading. Please reload this page.
stream: remove unused & undocumented cb - #32865
Conversation
destroy(err, cb) was an undocumented API which was previously used internally by core modules. However, this is no longer the case and it should be possible to safely remove this. Refs: nodejs#32808
ronag
commented
Apr 15, 2020
@nodejs/streams |
vweevers
commented
Apr 15, 2020
I would prefer we add this to the public API. How else can you do asynchronous cleanup? |
In it's current form it's broken and a correct implementation would pretty much be a shorthand for the example below:
finished(stream,onDestroyed);stream.destroy();I'm not opposed to that either. But I think we should either fix it or remove it. |
vweevers
commented
Apr 15, 2020
OK. In that case, LGTM. |
nodejs-github-bot
commented
Apr 15, 2020
mcollina
commented
Apr 15, 2020
I think we should do a full deprecation cycle first. |
Sounds good to me. Close this for now an re-open 15.x:ish? Should we add a runtime deprecation warning? |
mcollina
commented
Apr 15, 2020
I mean, do a runtime deprecation warning in v15 and remove in v16. |
ronag
commented
Apr 15, 2020
Closing in favor of runtime deprecation for v15 |
destroy(err, cb) was an undocumented API which
was previously used internally by core modules.
However, this is no longer the case and it should
be possible to safely remove this.
Refs: #32808
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes