[v14.x] Backport AbortController and friends by targos · Pull Request #38386 · nodejs/node
added
lib / src
v14.x labels
Apr 24, 2021
richardlau
added
the
semver-minor
label
Apr 24, 2021AbortController impl based very closely on: https://github.com/mysticatea/abort-controller Marked experimental. Not currently used by any of the existing promise apis. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#33527 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Using the new experimental AbortController... Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#33833 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
After successful timer finish the abort event callback would still reject (already resolved promise) upon calling abortController.abort(). Signed-off-by: Denys Otrishko <shishugi@gmail.com> PR-URL: nodejs#33949 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Move the promisified timers implementations into a new internal. submodule. Also adds `ref` option to the promisified versions. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#33950 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
On the web, `AbortError` is the error name, not the error message. Change the code to match that. PR-URL: nodejs#34763 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Allows an AbortSignal to be passed in to events.once() to cancel waiting on an event. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#34911 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#34912 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Add a line to the example code to clarify what happens if an event is emitted after listening is canceled. Make minor revisions to surrounding text. PR-URL: nodejs#35005 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021Fixes: #36064 PR-URL: #36094 Backport-PR-URL: #38386 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021I was working on AbortSignal for spawn and noticed there is a leak in the current code for AbortSignal support in child_process since it removes the wrong listener. I used the new signal as argument feature to make removing the listener easier and added a test. PR-URL: #36424 Backport-PR-URL: #38386 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021Fix an issue in writeFile where a file is opened, and not closed if the abort signal is aborted after the file was opened but before writing began. PR-URL: #37393 Backport-PR-URL: #38386 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021Refs: whatwg/dom#960 PR-URL: #37693 Backport-PR-URL: #38386 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request
Apr 30, 2021Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37693 Backport-PR-URL: #38386 Refs: whatwg/dom#960 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos pushed a commit that referenced this pull request
Apr 30, 2021targos pushed a commit that referenced this pull request
Apr 30, 2021This 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