-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix async wrap http #4509
Fix async wrap http #4509
Conversation
Do not go through async wrap hooks if we are already within the `MakeCallback`. This commit allows calling `MakeCallback` recursively.
Make `HTTPParser` an instance of `AsyncWrap` and make it use `MakeCallback`. This means that async wrap hooks will be called on consumed TCP sockets as well as on non-consumed ones. Fix: nodejs#4416
Doesn't address Switching to use |
Preemption won't be fixed by |
@indutny Do you mean that neither the domain nor async callbacks should run in the case of nested |
Mmm... I don't know, technically there is no point in reporting it, or is there? |
@@ -33,6 +33,7 @@ namespace node { | |||
V(UDPWRAP) \ | |||
V(UDPSENDWRAP) \ | |||
V(WRITEWRAP) \ | |||
V(HTTP) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind changing this to HTTPPARSER
(that's exactly what it's being used for right?) and also ordering it alphabetically?
Even if the |
I have totally no idea how it should work. cc @misterdjules maybe? |
@indutny @misterdjules responded in #4507 (comment) in more detail about how domains should work in @ofrobots I'm not sure |
@trevnorris My comment at #4507 (comment) was more a set of questions that came up to mind when reading the changes in #4507 than an authoritative answer. I still haven't had the time to make up my mind on what is the proper way to answer these questions. |
@indutny @trevnorris I would think that entering the domain in a nested synchronous The reason why it's useful to call For instance in the following code snippet:
by the time However, if for some reason you make the decision to re-enter the domain in that case , it needs to be exited. Basically it's either entering and exiting in nested calls, or not doing any of them. I hope that makes sense and that helps. |
@indutny PING PING PING |
@trevnorris took over this PR and created #5419, it landed a month ago. |
R=@trevnorris or @bnoordhuis