src: distinguish refed/unrefed threadsafe Immediates#33320
Closed
addaleax wants to merge 1 commit intonodejs:masterfrom
Closed
src: distinguish refed/unrefed threadsafe Immediates#33320addaleax wants to merge 1 commit intonodejs:masterfrom
addaleax wants to merge 1 commit intonodejs:masterfrom
Conversation
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending.
3 tasks
Collaborator
jasnell
reviewed
May 11, 2020
|
|
||
| template <typename Fn> | ||
| void Environment::SetImmediateThreadsafe(Fn&& cb) { | ||
| void Environment::SetImmediateThreadsafe(Fn&& cb, bool refed) { |
Member
There was a problem hiding this comment.
Would prefer an enum rather than a magical boolean :-)
Member
Author
There was a problem hiding this comment.
@jasnell Hm yeah … this reaches into the CallbackQueue implementation which also takes this as a boolean argument and returns the result as a boolean, so maybe in a follow-up PR? I’d like to be consistent here…
jasnell
approved these changes
May 15, 2020
addaleax
added a commit
that referenced
this pull request
May 16, 2020
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending. PR-URL: #33320 Reviewed-By: James M Snell <jasnell@gmail.com>
Member
Author
|
Landed in e346261 |
codebytere
pushed a commit
that referenced
this pull request
May 16, 2020
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending. PR-URL: #33320 Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax
added a commit
to addaleax/node
that referenced
this pull request
May 17, 2020
2 tasks
Merged
jasnell
pushed a commit
that referenced
this pull request
May 22, 2020
Refs: #33320 (comment) PR-URL: #33444 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
codebytere
pushed a commit
that referenced
this pull request
Jun 7, 2020
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending. PR-URL: #33320 Reviewed-By: James M Snell <jasnell@gmail.com>
codebytere
pushed a commit
to codebytere/node
that referenced
this pull request
Jun 9, 2020
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending. PR-URL: nodejs#33320 Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
codebytere
pushed a commit
that referenced
this pull request
Jun 18, 2020
Refs: #33320 (comment) PR-URL: #33444 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
4 tasks
addaleax
added a commit
to addaleax/node
that referenced
this pull request
Jul 8, 2020
Refs: nodejs#33320 (comment) PR-URL: nodejs#33444 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
addaleax
added a commit
that referenced
this pull request
Sep 23, 2020
Refs: #33320 (comment) PR-URL: #33444 Backport-PR-URL: #34263 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some situations, it can be useful to use threadsafe callbacks
on an
Environmentto perform cleanup operations that should runeven when the process would otherwise be ending.
(Split out from #33321)
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes