src: clean up resources on Environment teardown by addaleax · Pull Request #19377 · nodejs/node
added
semver-minor
labels
Mar 15, 2018
nodejs-github-bot
added
c++
labels
Mar 15, 2018addaleax added a commit that referenced this pull request
May 10, 2018On Windows, we can't just look up a FD for libuv streams and return it in `GetFD()`. However, we do sometimes construct streams from their FDs; in those cases, it should be okay to store the value on a class field. PR-URL: #19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request
May 10, 2018This currently crashes during environment cleanup because the object would be torn down while there are enabled categories. I’m not sure about the exact semantics here, but since the object cannot be garbage collected at this point anyway because it’s `Persistent` handle is strong, removing the destructor at least doesn’t make anything worse than it is right now (i.e. the destructor would never have been called before anyway). PR-URL: #19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request
May 10, 2018This is done to match the stream implementation, which also only actually stops reading in the next tick after the `'pause'` event is emitted. PR-URL: #19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request
May 10, 2018For libuv-backed streams, always explicitly stop reading before closing the handle. PR-URL: #19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request
May 10, 2018Instead of using the libuv mechanism directly, provide an internal `ThreadPoolWork` wrapper that takes care of increasing/decreasing the waiting request counter. PR-URL: #19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request
May 12, 2018
tmpfs
mentioned this pull request
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